Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions web/lib/mobx/store-init.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@ const MobxStoreInit = () => {
);

// 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");
currentTheme = currentTheme ? currentTheme : "system";
currentTheme = currentTheme && currentTheme != "undefined" ? currentTheme : "system";

// validating the theme and applying for initial state
if (currentTheme) {
Expand Down