diff --git a/assets/js/theme.js b/assets/js/theme.js index 169ea21d41b..f6c9cdf715a 100644 --- a/assets/js/theme.js +++ b/assets/js/theme.js @@ -50,12 +50,13 @@ let transTheme = () => { let initTheme = (theme) => { - if (theme == null) { + if (theme == null || theme == 'null') { const userPref = window.matchMedia; if (userPref && userPref('(prefers-color-scheme: dark)').matches) { theme = 'dark'; } } + setTheme(theme); }