Fixed dark theme now applying on the first time
This commit is contained in:
@@ -18,7 +18,10 @@ function changeLogoForTheme(){
|
||||
}
|
||||
|
||||
function isDarkModeSet(){
|
||||
return localStorage.theme == "dark";
|
||||
if (localStorage.theme)
|
||||
return localStorage.theme == "dark";
|
||||
else
|
||||
return window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
}
|
||||
|
||||
function changeTheme(theme:string){
|
||||
|
||||
Reference in New Issue
Block a user