Update dark-mode.js

This commit is contained in:
jake authored and GitHub committed 2020-05-04 12:49:06 -04:00
1 parent 4a36b8c526
commit 7d8aa59530
1 file changed
+4 -4
+4 -4
View File
@@ -67,12 +67,12 @@
// handle toggle click
toggle.addEventListener('click', function () {
// switch to the opposite theme & save preference in local storage
if (!active) {
activateTheme(dark);
storage.setItem(pref_key, dark);
} else {
if (active) {
activateTheme(light);
storage.setItem(pref_key, light);
} else {
activateTheme(dark);
storage.setItem(pref_key, dark);
}
}, true);
}