mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 20:52:56 +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
|
|
@ -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