提交 eaa1fe40 编写于 作者: M Matt Bierner

Fix possible undefined reference in managedFileContext

Fixes #39413
上级 a22a8ca8
......@@ -31,9 +31,11 @@ export default class ManagedFileContextManager {
this.onDidChangeActiveTextEditorSub.dispose();
}
private onDidChangeActiveTextEditor(editor: vscode.TextEditor): any {
const isManagedFile = isSupportedLanguageMode(editor.document) && this.normalizePath(editor.document.uri) !== null;
this.updateContext(isManagedFile);
private onDidChangeActiveTextEditor(editor?: vscode.TextEditor): any {
if (editor) {
const isManagedFile = isSupportedLanguageMode(editor.document) && this.normalizePath(editor.document.uri) !== null;
this.updateContext(isManagedFile);
}
}
private updateContext(newValue: boolean) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册