Fix theme (#697)
* fix theme * fix theme Co-authored-by: rohandebsarkar <rohandebsarkar@gmail.com>
This commit is contained in:
parent
f7274c0dab
commit
4e460ee494
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user