Skip to content

Commit 848660f

Browse files
authored
Merge pull request #2006 from 0xh3xa/master
Bug Fix: selected theme not loading when refreshing
2 parents 4b72484 + 0e7b1f7 commit 848660f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: src/web/waiters/OptionsWaiter.mjs

+5-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,11 @@ class OptionsWaiter {
175175
* Applies the user's preferred color scheme using the `prefers-color-scheme` media query.
176176
*/
177177
applyPreferredColorScheme() {
178-
const theme = this.getPreferredColorScheme();
178+
const themeFromStorage = this.app?.options?.theme;
179+
let theme = themeFromStorage;
180+
if (!theme) {
181+
theme = this.getPreferredColorScheme();
182+
}
179183
this.changeTheme(theme);
180184
}
181185

0 commit comments

Comments
 (0)