mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 23:13:02 +01:00
Merge pull request #10 from jpett/patch-1
Fix error Cannot read property 'getModeId' of null
This commit is contained in:
commit
ae46dfbebd
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue