Strict null work on extHostLanguageFeatures

This commit is contained in:
Matt Bierner
2019-02-08 20:54:53 -08:00
parent f1afe72087
commit f9687fc5ec
11 changed files with 106 additions and 90 deletions

View File

@@ -52,7 +52,9 @@ export class ExtHostDocumentsAndEditors implements ExtHostDocumentsAndEditorsSha
const id = uri.toString();
const data = this._documents.get(id);
this._documents.delete(id);
removedDocuments.push(data);
if (data) {
removedDocuments.push(data);
}
}
}
@@ -79,7 +81,9 @@ export class ExtHostDocumentsAndEditors implements ExtHostDocumentsAndEditorsSha
for (const id of delta.removedEditors) {
const editor = this._editors.get(id);
this._editors.delete(id);
removedEditors.push(editor);
if (editor) {
removedEditors.push(editor);
}
}
}