Bugfix for init val.

This commit is contained in:
Kasen IO 2020-01-24 08:16:13 -05:00
parent 2eca2cf10e
commit 4f56a847d7

View file

@ -34,7 +34,7 @@
//We are running the check here to preload the theme because it may load the incorrect one first for a split second. //We are running the check here to preload the theme because it may load the incorrect one first for a split second.
var darkDisabled = JSON.parse(localStorage.getItem('darkDisabled')); var darkDisabled = JSON.parse(localStorage.getItem('darkDisabled'));
if (darkDisabled == null) { if (darkDisabled == null) {
localStorage.setItem('darkDisabled', JSON.stringify("false")); localStorage.setItem('darkDisabled', JSON.stringify(false));
} else { } else {
var nightSheet = document.querySelector('[href="styles/night.css"]'); var nightSheet = document.querySelector('[href="styles/night.css"]');
nightSheet.disabled = darkDisabled; nightSheet.disabled = darkDisabled;
@ -120,7 +120,7 @@
}), }),
created: function () { created: function () {
}, },
methods: { methods: {
toggleNightMode: function() { toggleNightMode: function() {