diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-12-08 14:59:43 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-12-08 14:59:43 +0900 |
| commit | 1d2d46e7991f79562ae051a68669881cc9b4237f (patch) | |
| tree | 4b38c89b8855fe7fa6ad329ea9635feac2cbca8e /src/web/app/common/scripts | |
| parent | Revert "Fix #952" (diff) | |
| download | sharkey-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.ts | 4 |
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); } |