0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-05-07 16:38:38 +00:00
This commit is contained in:
Víctor Losada Hernández
2026-04-03 23:12:22 +02:00
parent a0e496bf1c
commit db2b45a095
+2 -2
View File
@@ -145,7 +145,7 @@ const CodeEditor = forwardRef(
const customHighlightPlugin = createHighlightPlugin(renderer, tab);
const languageExtension = language === 'css' ? css() : [markdown({ base: markdownLanguage, codeLanguages: languages }), html({ autoCloseTags: true })];
const themeExtension = themes[editorTheme] ?? themes['default'];
const themeExtension = Array.isArray(themes[editorTheme]) ? themes[editorTheme] : themes[editorTheme] || themes['default'];
return [
history(), //allows for undo and redo
@@ -234,7 +234,7 @@ const CodeEditor = forwardRef(
const view = viewRef.current;
if(!view) return;
const themeExtension = Array.isArray(themes[editorTheme]) ? themes[editorTheme] : [];
const themeExtension = Array.isArray(themes[editorTheme])? themes[editorTheme]: themes[editorTheme] || themes['default'];
view.dispatch({
effects : themeCompartment.reconfigure(themeExtension),