summaryrefslogtreecommitdiffstats
path: root/assets/js
diff options
context:
space:
mode:
authorsijanec <sijanecantonluka@gmail.com>2020-05-20 17:12:13 +0200
committersijanec <sijanecantonluka@gmail.com>2020-05-20 17:12:13 +0200
commit3130a962bf7dba65acdd78d6ade2c88199094827 (patch)
tree0d6ecb31eafea3e39d1f7835e0a4157f41550837 /assets/js
parentchanged load order (diff)
downloadbeziapp-3130a962bf7dba65acdd78d6ade2c88199094827.tar
beziapp-3130a962bf7dba65acdd78d6ade2c88199094827.tar.gz
beziapp-3130a962bf7dba65acdd78d6ade2c88199094827.tar.bz2
beziapp-3130a962bf7dba65acdd78d6ade2c88199094827.tar.lz
beziapp-3130a962bf7dba65acdd78d6ade2c88199094827.tar.xz
beziapp-3130a962bf7dba65acdd78d6ade2c88199094827.tar.zst
beziapp-3130a962bf7dba65acdd78d6ade2c88199094827.zip
Diffstat (limited to 'assets/js')
-rw-r--r--assets/js/settings.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/assets/js/settings.js b/assets/js/settings.js
index 5712039..b53d2ce 100644
--- a/assets/js/settings.js
+++ b/assets/js/settings.js
@@ -25,12 +25,18 @@ document.addEventListener("DOMContentLoaded", async () => {
});
localforage.getItem("chosenLang").then((value) => {
- let selectedLanguage = value ?? "sl";
+ let selectedLanguage = value;
+ if(value == null || value.length < 1) {
+ selectedLanguage = "sl";
+ }
$(`#option-${selectedLanguage}`).attr("selected", true);
}).catch(() => {});
localforage.getItem("theme").then((value) => {
- let selectedTheme = value ?? "themeLight";
+ let selectedTheme = value;
+ if(value == null || value.length < 1) {
+ selectedTheme = "themeLight";
+ }
$(`#option-${selectedTheme}`).attr("selected", true);
}).catch(() => {});