提交 f94cd7b2 编写于 作者: A Alex Dima

Avoid NPE

上级 80a3ba94
......@@ -211,6 +211,9 @@ export class TextMateService implements ITextMateService {
const grammarRegistry = new Registry({
loadGrammar: (scopeName: string) => {
const location = this._scopeRegistry.getGrammarLocation(scopeName);
if (!location) {
return null;
}
return this._fileService.resolveContent(location).then(content => {
return parseRawGrammar(content.value, location.path);
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册