diff options
author | sijanec <sijanecantonluka@gmail.com> | 2020-05-20 17:12:13 +0200 |
---|---|---|
committer | sijanec <sijanecantonluka@gmail.com> | 2020-05-20 17:12:13 +0200 |
commit | 3130a962bf7dba65acdd78d6ade2c88199094827 (patch) | |
tree | 0d6ecb31eafea3e39d1f7835e0a4157f41550837 /dist/js | |
parent | changed load order (diff) | |
download | beziapp-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 'dist/js')
-rwxr-xr-x | dist/js/app.js | 2 | ||||
-rw-r--r-- | dist/js/settings.js | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/dist/js/app.js b/dist/js/app.js index e935a0f..07197bb 100755 --- a/dist/js/app.js +++ b/dist/js/app.js @@ -3,7 +3,7 @@ const app_version = "1.0.13-beta"; -const previous_commit = "c721f2fd02613a5f8d5beb3b66a3681542da2048"; +const previous_commit = "f4aa5ca7f0ee77f5b26ff3f9d1b5c9f25cd1d2cb"; if ("serviceWorker" in navigator) { navigator.serviceWorker.register("/sw.js") diff --git a/dist/js/settings.js b/dist/js/settings.js index 5712039..b53d2ce 100644 --- a/dist/js/settings.js +++ b/dist/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(() => {}); |