aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/main.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-03-08 12:01:55 +0100
committerChocobozzz <me@florianbigard.com>2018-03-08 12:01:55 +0100
commit73e09f270660c78e50e86921a5ca6b356f760c7c (patch)
treefc12bdd72840715f2a5e0ffba480b60c4bc2b7fb /client/src/main.ts
parent6a6d92b1ecca1dfcf4b13f291553f2485814f730 (diff)
downloadPeerTube-73e09f270660c78e50e86921a5ca6b356f760c7c.tar.gz
PeerTube-73e09f270660c78e50e86921a5ca6b356f760c7c.tar.zst
PeerTube-73e09f270660c78e50e86921a5ca6b356f760c7c.zip
Try to detect incompatible web browsers
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 })