mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: themening validation in store init. (#2350)
This commit is contained in:
parent
eacf543439
commit
1e9149d872
@ -24,9 +24,12 @@ const MobxStoreInit = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// theme
|
// theme
|
||||||
if (store.theme.theme === null && store?.user?.currentUserSettings) {
|
if (
|
||||||
|
(store.theme.theme === null || store.theme.theme === "undefined") &&
|
||||||
|
store?.user?.currentUserSettings
|
||||||
|
) {
|
||||||
let currentTheme = localStorage.getItem("theme");
|
let currentTheme = localStorage.getItem("theme");
|
||||||
currentTheme = currentTheme ? currentTheme : "system";
|
currentTheme = currentTheme && currentTheme != "undefined" ? currentTheme : "system";
|
||||||
|
|
||||||
// validating the theme and applying for initial state
|
// validating the theme and applying for initial state
|
||||||
if (currentTheme) {
|
if (currentTheme) {
|
||||||
|
Loading…
Reference in New Issue
Block a user