Fixes #61027, Error: Cannot read property 'getModeId' of null

This commit is contained in:
Rachel Macfarlane
2018-10-23 15:01:11 -07:00
parent 29d6612fcf
commit c0aae6717d
@@ -50,6 +50,10 @@ export class MainThreadComments extends Disposable implements MainThreadComments
}
const id = editor.getId();
const model = editor.getModel();
if (model === null) {
return;
}
if (editors.filter(ed => ed.getId() === id).length > 0) {
// it's an active editor, we are going to update this editor's comments anyways
} else {