Skip to content

Commit

Permalink
TypeError: expressionForRoot is not a function (fixes #30034)
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Jul 3, 2017
1 parent 33e251c commit a76af8a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/vs/workbench/common/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,13 @@ export class ResourceGlobMatcher {

public matches(resource: URI): boolean {
const root = this.contextService.getRoot(resource);
const expressionForRoot = this.mapRootToParsedExpression.get(root ? root.toString() : ResourceGlobMatcher.NO_ROOT);

let expressionForRoot: ParsedExpression;
if (root && this.mapRootToParsedExpression.has(root.toString())) {
expressionForRoot = this.mapRootToParsedExpression.get(root.toString());
} else {
expressionForRoot = this.mapRootToParsedExpression.get(ResourceGlobMatcher.NO_ROOT);
}

// If the resource if from a workspace, convert its absolute path to a relative
// path so that glob patterns have a higher probability to match. For example
Expand Down

0 comments on commit a76af8a

Please sign in to comment.