提交 a76af8a6 编写于 作者: B Benjamin Pasero

TypeError: expressionForRoot is not a function (fixes #30034)

上级 33e251c6
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册