Merge pull request #10 from jpett/patch-1

Fix error Cannot read property 'getModeId' of null
pull/2748/head
Alexandru Dima 4 years ago committed by GitHub
commit ae46dfbebd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -103,7 +103,7 @@ export class DiagnosticsAdapter {
.then((diagnostics) => {
const markers = diagnostics.map((d) => toDiagnostics(resource, d));
let model = editor.getModel(resource);
if (model.getModeId() === languageId) {
if (model && model.getModeId() === languageId) {
editor.setModelMarkers(model, languageId, markers);
}
})

Loading…
Cancel
Save