mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 23:13:02 +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": {
|
"devDependencies": {
|
||||||
"jsonc-parser": "^2.0.3",
|
"jsonc-parser": "^2.0.3",
|
||||||
"monaco-editor-core": "0.16.0",
|
"monaco-editor-core": "0.16.1",
|
||||||
"monaco-languages": "1.7.0",
|
"monaco-languages": "1.7.0",
|
||||||
"monaco-plugin-helpers": "^1.0.2",
|
"monaco-plugin-helpers": "^1.0.2",
|
||||||
"requirejs": "^2.3.6",
|
"requirejs": "^2.3.6",
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ export class DiagnosticsAdapter {
|
||||||
return worker.doValidation(resource.toString()).then(diagnostics => {
|
return worker.doValidation(resource.toString()).then(diagnostics => {
|
||||||
const markers = diagnostics.map(d => toDiagnostics(resource, d));
|
const markers = diagnostics.map(d => toDiagnostics(resource, d));
|
||||||
let model = monaco.editor.getModel(resource);
|
let model = monaco.editor.getModel(resource);
|
||||||
if (model.getModeId() === languageId) {
|
if (model && model.getModeId() === languageId) {
|
||||||
monaco.editor.setModelMarkers(model, languageId, markers);
|
monaco.editor.setModelMarkers(model, languageId, markers);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue