diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-12-08 14:56:10 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-12-08 14:56:10 +0900 |
| commit | 8c70c9d6a0290c0d09e53e4a550d3e28c33059d2 (patch) | |
| tree | 744a4330b0c2d9248e835f1c76e87c34e1c88b87 /src/web/app/common/scripts | |
| parent | v3268 (diff) | |
| download | sharkey-8c70c9d6a0290c0d09e53e4a550d3e28c33059d2.tar.gz sharkey-8c70c9d6a0290c0d09e53e4a550d3e28c33059d2.tar.bz2 sharkey-8c70c9d6a0290c0d09e53e4a550d3e28c33059d2.zip | |
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); } |