diff options
author | Chocobozzz <me@florianbigard.com> | 2021-01-18 11:16:37 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-01-18 11:16:37 +0100 |
commit | 1d22d2514f7be14d51ed2ab78e13df5da2646546 (patch) | |
tree | 87ee5fde348f9b648efeff82461867ee2d1c0fb2 /client/src/main.ts | |
parent | 83befebe52139f7533669b2e9b99ca1f807eb7ce (diff) | |
download | PeerTube-1d22d2514f7be14d51ed2ab78e13df5da2646546.tar.gz PeerTube-1d22d2514f7be14d51ed2ab78e13df5da2646546.tar.zst PeerTube-1d22d2514f7be14d51ed2ab78e13df5da2646546.zip |
Fix service worker
Diffstat (limited to 'client/src/main.ts')
-rw-r--r-- | client/src/main.ts | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/client/src/main.ts b/client/src/main.ts index 99976a3f7..84c82203d 100644 --- a/client/src/main.ts +++ b/client/src/main.ts | |||
@@ -11,11 +11,6 @@ if (environment.production) { | |||
11 | const bootstrap = () => platformBrowserDynamic() | 11 | const bootstrap = () => platformBrowserDynamic() |
12 | .bootstrapModule(AppModule) | 12 | .bootstrapModule(AppModule) |
13 | .then(bootstrapModule => { | 13 | .then(bootstrapModule => { |
14 | if ('serviceWorker' in navigator && environment.production) { | ||
15 | navigator.serviceWorker.register('/ngsw-worker.js') | ||
16 | .catch(err => console.error('Cannot register service worker.', err)) | ||
17 | } | ||
18 | |||
19 | if (!environment.production) { | 14 | if (!environment.production) { |
20 | const applicationRef = bootstrapModule.injector.get(ApplicationRef) | 15 | const applicationRef = bootstrapModule.injector.get(ApplicationRef) |
21 | const componentRef = applicationRef.components[0] | 16 | const componentRef = applicationRef.components[0] |