@bigbinary/neeto-themes-frontend 4.2.4-beta1 → 4.2.4-beta2

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.
@@ -1476,9 +1476,13 @@ var Customize = function Customize(_ref) {
1476
1476
  _useListThemes$data2$ = _useListThemes$data2.defaultThemes,
1477
1477
  defaultThemes = _useListThemes$data2$ === void 0 ? [] : _useListThemes$data2$,
1478
1478
  isLoadingSystemThemes = _useListThemes.isLoading;
1479
- var themeToCustomize = isCustomizingSystemTheme ? buildSystemThemeCopy(neetoCist.findBy({
1479
+ var sourceTheme = isCustomizingSystemTheme ? neetoCist.findBy({
1480
1480
  id: sourceThemeId
1481
- }, defaultThemes)) : themeData;
1481
+ }, defaultThemes) : null;
1482
+ var systemThemeCopy = react.useMemo(function () {
1483
+ return buildSystemThemeCopy(sourceTheme);
1484
+ }, [sourceTheme === null || sourceTheme === void 0 ? void 0 : sourceTheme.id]);
1485
+ var themeToCustomize = isCustomizingSystemTheme ? systemThemeCopy : themeData;
1482
1486
  var isLoading = isFetchingSchema || isLoadingTheme || isCustomizingSystemTheme && isLoadingSystemThemes;
1483
1487
  var isThemeGlobalTheme = themeId && (globalTheme === null || globalTheme === void 0 ? void 0 : globalTheme.id) === themeId;
1484
1488
  var isCurrentThemeAndGlobalThemeSame = (currentTheme === null || currentTheme === void 0 ? void 0 : currentTheme.id) === (globalTheme === null || globalTheme === void 0 ? void 0 : globalTheme.id);