Skip to content

Commit 7708adb

Browse files
authored
fix: recognize global theme mode (#2357)
1 parent 167c98c commit 7708adb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

_javascript/modules/theme.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ class Theme {
3939
}
4040

4141
static get #mode() {
42-
return sessionStorage.getItem(this.#modeKey);
42+
return (
43+
sessionStorage.getItem(this.#modeKey) ||
44+
document.documentElement.getAttribute(this.#modeAttr)
45+
);
4346
}
4447

4548
static get #isDarkMode() {

0 commit comments

Comments
 (0)