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