Skip to content

Commit

Permalink
fix: use getLanguageId instead of model.id (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin authored Apr 22, 2022
1 parent 1405e1d commit 22f039a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/hip-dolphins-relax.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ng-monaco-editor": patch
---

fix: use getLanguageId instead of model.id
2 changes: 1 addition & 1 deletion src/monaco-common-editor.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export abstract class MonacoCommonEditorComponent
this.editor = this.createEditor();
this.listenModelChanges();
this.editorChange.emit(this.editor);
this.modelId = this.model!.id;
this.modelId = this.model!.getLanguageId();
this.cdr.markForCheck();
}
}
Expand Down

0 comments on commit 22f039a

Please sign in to comment.