Handle invalid theme in ui state (#1504)
This commit is contained in:
@@ -12,7 +12,7 @@ const useCurrentTheme = () => {
|
|||||||
return prefersLightMode ? themes.LightTheme : themes.DarkTheme
|
return prefersLightMode ? themes.LightTheme : themes.DarkTheme
|
||||||
}
|
}
|
||||||
const themeName =
|
const themeName =
|
||||||
state.theme ||
|
Object.keys(themes).find((t) => t === state.theme) ||
|
||||||
Object.keys(themes).find(
|
Object.keys(themes).find(
|
||||||
(t) => themes[t].themeName === config.defaultTheme
|
(t) => themes[t].themeName === config.defaultTheme
|
||||||
) ||
|
) ||
|
||||||
|
|||||||
Reference in New Issue
Block a user