@flozy/editor 10.8.4 → 10.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -145,9 +145,10 @@ export const useEditorTheme = () => {
|
|
145
145
|
const {
|
146
146
|
theme
|
147
147
|
} = pageProps || {};
|
148
|
-
|
148
|
+
const fallbackTheme = baseTheme?.theme || {};
|
149
|
+
console.log("fallbackTheme", fallbackTheme, baseTheme);
|
149
150
|
return {
|
150
|
-
selectedTheme: theme?.theme ||
|
151
|
+
selectedTheme: theme?.theme || fallbackTheme,
|
151
152
|
updateTheme: (update, actionData) => updateTheme(editor, pageSt, update, actionData, triggerRender),
|
152
153
|
theme
|
153
154
|
};
|
@@ -31,7 +31,8 @@ function ThemeList({
|
|
31
31
|
const {
|
32
32
|
value
|
33
33
|
} = e.target;
|
34
|
-
const
|
34
|
+
const fallbackTheme = baseTheme || {};
|
35
|
+
const selectedTheme = themes.find(t => t.id === value) || fallbackTheme;
|
35
36
|
updateTheme(selectedTheme, "THEME_CHANGE");
|
36
37
|
};
|
37
38
|
return /*#__PURE__*/_jsx(Box, {
|