aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/main.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/main.ts')
-rw-r--r--client/src/main.ts13
1 files changed, 8 insertions, 5 deletions
diff --git a/client/src/main.ts b/client/src/main.ts
index 4b18d163c..e1a69e4a4 100644
--- a/client/src/main.ts
+++ b/client/src/main.ts
@@ -20,11 +20,14 @@ const bootstrap = () => platformBrowserDynamic()
20 // .catch(err => console.error('Cannot register service worker.', err)) 20 // .catch(err => console.error('Cannot register service worker.', err))
21 // } 21 // }
22 22
23 navigator.serviceWorker.getRegistrations().then(registrations => { 23 if (navigator.serviceWorker) {
24 for (const registration of registrations) { 24 navigator.serviceWorker.getRegistrations()
25 registration.unregister() 25 .then(registrations => {
26 } 26 for (const registration of registrations) {
27 }) 27 registration.unregister()
28 }
29 })
30 }
28 31
29 return bootstrapModule 32 return bootstrapModule
30 }) 33 })