Skip to content

Commit 22f039a

Browse files
authored
fix: use getLanguageId instead of model.id (#76)
1 parent 1405e1d commit 22f039a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/hip-dolphins-relax.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"ng-monaco-editor": patch
3+
---
4+
5+
fix: use getLanguageId instead of model.id

src/monaco-common-editor.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ export abstract class MonacoCommonEditorComponent
227227
this.editor = this.createEditor();
228228
this.listenModelChanges();
229229
this.editorChange.emit(this.editor);
230-
this.modelId = this.model!.id;
230+
this.modelId = this.model!.getLanguageId();
231231
this.cdr.markForCheck();
232232
}
233233
}

0 commit comments

Comments
 (0)