From 3f6ecd65edcd498d4d1828e9e950c14c3d6bb8b8 Mon Sep 17 00:00:00 2001 From: Katherine Date: Sun, 9 Mar 2025 07:43:57 +0800 Subject: [PATCH] fix: theme switching fails after multiple consecutive switches (#6387) --- .../src/client/hooks/useUpdateThemeSettings.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/plugins/@nocobase/plugin-theme-editor/src/client/hooks/useUpdateThemeSettings.tsx b/packages/plugins/@nocobase/plugin-theme-editor/src/client/hooks/useUpdateThemeSettings.tsx index 4916cbe06a..f0f8bd4f3c 100644 --- a/packages/plugins/@nocobase/plugin-theme-editor/src/client/hooks/useUpdateThemeSettings.tsx +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/client/hooks/useUpdateThemeSettings.tsx @@ -17,9 +17,6 @@ export function useUpdateThemeSettings() { const updateUserThemeSettings = useCallback( async (themeId: number | null) => { - if (themeId === currentUser.data.data.systemSettings?.themeId) { - return; - } try { await api.resource('users').updateTheme({ values: { @@ -36,6 +33,7 @@ export function useUpdateThemeSettings() { }, }); } catch (err) { + console.log(error); error(err); } },