Bug fixes

This commit is contained in:
robiot 2021-09-16 17:02:49 +03:00
parent fb4d01bd48
commit 12ce1def9d

View File

@ -22,11 +22,12 @@ window.addEventListener("load", function () {
function initTheme() { function initTheme() {
var currentTheme = localStorage.getItem("currentTheme"); var currentTheme = localStorage.getItem("currentTheme");
if (currentTheme === null) { if (currentTheme == null) {
console.log("null")
document.body.removeAttribute("data-theme") document.body.removeAttribute("data-theme")
} else { } else {
console.log("there")
document.body.setAttribute("data-theme", currentTheme) document.body.setAttribute("data-theme", currentTheme)
$("#theme-selector").val(currentTheme).change();
} }
} }