mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
Handle unset editor theme (#12892)
GitOrigin-RevId: 0e3413c08c6fd0752cd90ee868fec9b0f9f77437
This commit is contained in:
@@ -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`
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user