Skip to content

Commit 745a201

Browse files
rohandebsarkarpecey
authored andcommitted
Fix theme (alshedivat#697)
* fix theme * fix theme Co-authored-by: rohandebsarkar <[email protected]>
1 parent 1ddc483 commit 745a201

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

assets/js/theme.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,13 @@ let transTheme = () => {
5050

5151

5252
let initTheme = (theme) => {
53-
if (theme == null) {
53+
if (theme == null || theme == 'null') {
5454
const userPref = window.matchMedia;
5555
if (userPref && userPref('(prefers-color-scheme: dark)').matches) {
5656
theme = 'dark';
5757
}
5858
}
59+
5960
setTheme(theme);
6061
}
6162

0 commit comments

Comments
 (0)