@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.
@@ -1454,9 +1454,13 @@ var Customize = function Customize(_ref) {
1454
1454
  _useListThemes$data2$ = _useListThemes$data2.defaultThemes,
1455
1455
  defaultThemes = _useListThemes$data2$ === void 0 ? [] : _useListThemes$data2$,
1456
1456
  isLoadingSystemThemes = _useListThemes.isLoading;
1457
- var themeToCustomize = isCustomizingSystemTheme ? buildSystemThemeCopy(neetoCist.findBy({
1457
+ var sourceTheme = isCustomizingSystemTheme ? neetoCist.findBy({
1458
1458
  id: sourceThemeId
1459
- }, defaultThemes)) : themeData;
1459
+ }, defaultThemes) : null;
1460
+ var systemThemeCopy = react.useMemo(function () {
1461
+ return buildSystemThemeCopy(sourceTheme);
1462
+ }, [sourceTheme === null || sourceTheme === void 0 ? void 0 : sourceTheme.id]);
1463
+ var themeToCustomize = isCustomizingSystemTheme ? systemThemeCopy : themeData;
1460
1464
  var isLoading = isFetchingSchema || isLoadingTheme || isCustomizingSystemTheme && isLoadingSystemThemes;
1461
1465
  var isThemeGlobalTheme = themeId && (globalTheme === null || globalTheme === void 0 ? void 0 : globalTheme.id) === themeId;
1462
1466
  var isCurrentThemeAndGlobalThemeSame = (currentTheme === null || currentTheme === void 0 ? void 0 : currentTheme.id) === (globalTheme === null || globalTheme === void 0 ? void 0 : globalTheme.id);