提交 72ba4524 编写于 作者: B Benjamin Pasero

fix npes

上级 f91e05b5
......@@ -661,7 +661,7 @@ export class EditorStatus implements IStatusbarItem {
const activeEditor = this.editorService.getActiveEditor();
if (activeEditor) {
const activeResource = toResource(activeEditor.input, { supportSideBySide: true, filter: ['file', 'untitled'] });
if (activeResource.toString() === resource.toString()) {
if (activeResource && activeResource.toString() === resource.toString()) {
return this.onEncodingChange(<IBaseEditor>activeEditor); // only update if the encoding changed for the active resource
}
}
......
......@@ -198,7 +198,7 @@ export class EditorGroup implements IEditorGroup {
for (let i = 0; i < this.editors.length; i++) {
const editor = this.editors[i];
const editorResource = toResource(editor, { supportSideBySide: true });
if (editorResource.toString() === resource.toString()) {
if (editorResource && editorResource.toString() === resource.toString()) {
return editor;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册