Skip to content

Commit

Permalink
πŸ› Fix default theme settings
Browse files Browse the repository at this point in the history
  • Loading branch information
ssakone committed Dec 29, 2023
1 parent b05de96 commit cddc71e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/controllers/profile.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const loadTheme = async (): Promise<void> => {
return new Promise(async (resolve, reject) => {
try {
const value = await browser.get('theme');
if ("theme" in value === false) browser.set({ theme: "dark" });
if (value?.theme !== 'dark') {
theme.set(value?.theme as string);
document.documentElement.classList.remove('dark');
Expand All @@ -70,6 +71,8 @@ const loadTheme = async (): Promise<void> => {
}
resolve();
} catch (err) {
theme.set('dark');
document.documentElement.classList.add('dark');
reject(err);
}
});
Expand Down

0 comments on commit cddc71e

Please sign in to comment.