diff --git a/services/web/frontend/js/features/source-editor/extensions/theme.ts b/services/web/frontend/js/features/source-editor/extensions/theme.ts index 2039aff297..0d4cf4a493 100644 --- a/services/web/frontend/js/features/source-editor/extensions/theme.ts +++ b/services/web/frontend/js/features/source-editor/extensions/theme.ts @@ -243,6 +243,10 @@ const staticTheme = EditorView.theme({ }) const loadSelectedTheme = async (editorTheme: string) => { + if (!editorTheme) { + editorTheme = 'textmate' // use the default theme if unset + } + const { theme, highlightStyle, dark } = await import( /* webpackChunkName: "cm6-theme" */ `../themes/cm6/${editorTheme}.json` )