diff --git a/public/bento.js b/public/bento.js index 9d53311..fafb1dd 100644 --- a/public/bento.js +++ b/public/bento.js @@ -18,6 +18,12 @@ async function registerServiceWorker() { } catch (error) { console.error(`Registration failed with ${error}`) } + let ref = false + navigator.serviceWorker.addEventListener("controllerchange", function () { + if (ref) return + ref = true + window.location.reload() + }) } }