X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=client%2Fsrc%2Fmain.ts;h=86fdabba564dd4d40a490f2d508d9660234ccd9f;hb=852ecadfc4284aa2f8110274ff49d2a53d4166ba;hp=dee962180896dbf66229d4a7ddab430ca6666345;hpb=be0f59b4eec3c2c4dcd151e2b174be39dff1568e;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/main.ts b/client/src/main.ts index dee962180..86fdabba5 100644 --- a/client/src/main.ts +++ b/client/src/main.ts @@ -34,7 +34,7 @@ const bootstrap = () => platformBrowserDynamic() // .catch(err => console.error('Cannot register service worker.', err)) // } - if (navigator.serviceWorker) { + if (navigator.serviceWorker && typeof navigator.serviceWorker.getRegistrations === 'function') { navigator.serviceWorker.getRegistrations() .then(registrations => { for (const registration of registrations) {