mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 05:29:26 +08:00
fix: theme switching fails after multiple consecutive switches (#6387)
This commit is contained in:
parent
a6e03e35b4
commit
3f6ecd65ed
@ -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);
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user