summaryrefslogtreecommitdiffstats
path: root/assets
diff options
context:
space:
mode:
authorsijanec <sijanecantonluka@gmail.com>2020-06-08 23:33:02 +0200
committersijanec <sijanecantonluka@gmail.com>2020-06-08 23:33:02 +0200
commitcdf17dfd5d57b5461831868feb2497073a9b19d6 (patch)
treedcea77f19cf081e8cf4f86abb76358fe3281ca55 /assets
parentkilling the cache ... good to go (diff)
downloadbeziapp-cdf17dfd5d57b5461831868feb2497073a9b19d6.tar
beziapp-cdf17dfd5d57b5461831868feb2497073a9b19d6.tar.gz
beziapp-cdf17dfd5d57b5461831868feb2497073a9b19d6.tar.bz2
beziapp-cdf17dfd5d57b5461831868feb2497073a9b19d6.tar.lz
beziapp-cdf17dfd5d57b5461831868feb2497073a9b19d6.tar.xz
beziapp-cdf17dfd5d57b5461831868feb2497073a9b19d6.tar.zst
beziapp-cdf17dfd5d57b5461831868feb2497073a9b19d6.zip
Diffstat (limited to 'assets')
-rw-r--r--assets/js/app.js.bvr6
1 files changed, 4 insertions, 2 deletions
diff --git a/assets/js/app.js.bvr b/assets/js/app.js.bvr
index c252c40..9bddb31 100644
--- a/assets/js/app.js.bvr
+++ b/assets/js/app.js.bvr
@@ -107,9 +107,11 @@ window.onunhandledrejection = error_report_function;
document.addEventListener("DOMContentLoaded", () => {
var update_interval = setInterval(() => { // ok, it's value is never read, so what?!
localforage.getItem("lastUpdate").then((data) => {
- if (Math.floor(Date.now() / 1000) > data + BEZIAPP_UPDATE_INTERVAL) {
+ if (Math.floor(Date.now() / 1000) > Number(data) + BEZIAPP_UPDATE_INTERVAL) {
// trigger an update
- update_app_function();
+ localforage.setItem("lastUpdate", Math.floor(Date.now() / 1000)) .then(()=>{
+ update_app_function();
+ });
}
});
}, 1000 * BEZIAPP_UPDATE_INTERVAL);