summaryrefslogtreecommitdiff
path: root/src/web/app/common/scripts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-12-08 14:59:43 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-12-08 14:59:43 +0900
commit1d2d46e7991f79562ae051a68669881cc9b4237f (patch)
tree4b38c89b8855fe7fa6ad329ea9635feac2cbca8e /src/web/app/common/scripts
parentRevert "Fix #952" (diff)
downloadsharkey-1d2d46e7991f79562ae051a68669881cc9b4237f.tar.gz
sharkey-1d2d46e7991f79562ae051a68669881cc9b4237f.tar.bz2
sharkey-1d2d46e7991f79562ae051a68669881cc9b4237f.zip
RE: Fix #952
Diffstat (limited to 'src/web/app/common/scripts')
-rw-r--r--src/web/app/common/scripts/check-for-update.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/web/app/common/scripts/check-for-update.ts b/src/web/app/common/scripts/check-for-update.ts
index 1540924510..0b58c0a674 100644
--- a/src/web/app/common/scripts/check-for-update.ts
+++ b/src/web/app/common/scripts/check-for-update.ts
@@ -11,6 +11,10 @@ export default async function(mios: MiOS) {
// Clear cache (serive worker)
try {
navigator.serviceWorker.controller.postMessage('clear');
+
+ navigator.serviceWorker.getRegistrations().then(registrations => {
+ registrations.forEach(registration => registration.unregister());
+ });
} catch (e) {
console.error(e);
}