summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);