@flozy/editor 10.8.3 → 10.8.5

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,8 +145,9 @@ export const useEditorTheme = () => {
145
145
  const {
146
146
  theme
147
147
  } = pageProps || {};
148
+ const fallbackTheme = baseTheme?.theme || {};
148
149
  return {
149
- selectedTheme: theme?.theme || baseTheme?.theme,
150
+ selectedTheme: theme?.theme || fallbackTheme,
150
151
  updateTheme: (update, actionData) => updateTheme(editor, pageSt, update, actionData, triggerRender),
151
152
  theme
152
153
  };
@@ -31,7 +31,8 @@ function ThemeList({
31
31
  const {
32
32
  value
33
33
  } = e.target;
34
- const selectedTheme = themes.find(t => t.id === value) || baseTheme;
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, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "10.8.3",
3
+ "version": "10.8.5",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"