mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 22:02:55 +01:00
Exceptions when trying to remove a registered JSON schema and disposing a model. Fixes Microsoft/monaco-editor#1254
This commit is contained in:
parent
d9372e4944
commit
40c2b11e24
2 changed files with 2 additions and 2 deletions
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue