Skip to content

Commit 695e269

Browse files
committed
refactor(themetoggle): Check localStorage for color scheme
1 parent ac08855 commit 695e269

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

frontend/src/lib/components/ThemeToggle.svelte

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
theme = 'dark';
1313
}
1414
15-
theme = localStorage.getItem('color-scheme') || theme;
15+
const localTheme = localStorage.getItem('color-scheme');
16+
if (localTheme) {
17+
theme = localTheme;
18+
}
1619
1720
setTheme();
1821

0 commit comments

Comments
 (0)