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.ts15
1 files changed, 11 insertions, 4 deletions
diff --git a/client/src/main.ts b/client/src/main.ts
index 9686ba4b8..4b18d163c 100644
--- a/client/src/main.ts
+++ b/client/src/main.ts
@@ -13,11 +13,18 @@ if (environment.production) {
13const bootstrap = () => platformBrowserDynamic() 13const bootstrap = () => platformBrowserDynamic()
14 .bootstrapModule(AppModule) 14 .bootstrapModule(AppModule)
15 .then(bootstrapModule => { 15 .then(bootstrapModule => {
16 // TODO: Uncomment and remove unregistration when https://github.com/angular/angular/issues/21191 is fixed
16 // TODO: Remove when https://github.com/angular/angular-cli/issues/8779 is fixed? 17 // TODO: Remove when https://github.com/angular/angular-cli/issues/8779 is fixed?
17 if ('serviceWorker' in navigator && environment.production) { 18 // if ('serviceWorker' in navigator && environment.production) {
18 navigator.serviceWorker.register('/ngsw-worker.js') 19 // navigator.serviceWorker.register('/ngsw-worker.js')
19 .catch(err => console.error('Cannot register service worker.', err)) 20 // .catch(err => console.error('Cannot register service worker.', err))
20 } 21 // }
22
23 navigator.serviceWorker.getRegistrations().then(registrations => {
24 for (const registration of registrations) {
25 registration.unregister()
26 }
27 })
21 28
22 return bootstrapModule 29 return bootstrapModule
23 }) 30 })