Skip to content

Commit 5f7f612

Browse files
committed
Bugfix:
- fix: code editor js (cherry picked from commit 83b9f98)
1 parent c0a40ae commit 5f7f612

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

resources/dist/components/code-editor.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/js/components/code-editor.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default function codeEditorFormComponent({
3030
themeConfig: undefined,
3131

3232
init() {
33-
this.themeConfig = new Compartment();
33+
this.configureThemeConfig();
3434
this.configureEditor();
3535
},
3636
getTheme() {
@@ -45,7 +45,13 @@ export default function codeEditorFormComponent({
4545
});
4646
}
4747
},
48+
configureThemeConfig() {
49+
if (this.themeConfig === undefined) {
50+
this.themeConfig = new Compartment();
51+
}
52+
},
4853
configureEditor() {
54+
this.configureThemeConfig();
4955

5056
const themeExtension = this.themeConfig.of(this.getTheme());
5157

0 commit comments

Comments
 (0)