Skip to content
This repository has been archived by the owner on Nov 5, 2021. It is now read-only.

Commit

Permalink
Exceptions when trying to remove a registered JSON schema and disposi…
Browse files Browse the repository at this point in the history
…ng a model. Fixes microsoft/monaco-editor#1254
  • Loading branch information
aeschli committed Mar 18, 2019
1 parent d9372e4 commit 40c2b11
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"devDependencies": {
"jsonc-parser": "^2.0.3",
"monaco-editor-core": "0.16.0",
"monaco-editor-core": "0.16.1",
"monaco-languages": "1.7.0",
"monaco-plugin-helpers": "^1.0.2",
"requirejs": "^2.3.6",
Expand Down
2 changes: 1 addition & 1 deletion src/languageFeatures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export class DiagnosticsAdapter {
return worker.doValidation(resource.toString()).then(diagnostics => {
const markers = diagnostics.map(d => toDiagnostics(resource, d));
let model = monaco.editor.getModel(resource);
if (model.getModeId() === languageId) {
if (model && model.getModeId() === languageId) {
monaco.editor.setModelMarkers(model, languageId, markers);
}
});
Expand Down

0 comments on commit 40c2b11

Please sign in to comment.