only initialize service workers if they are available
This commit is contained in:
parent
87813d3005
commit
3aa18ef7c7
|
@ -1,3 +1,5 @@
|
||||||
export default function (): void {
|
export default function (): void {
|
||||||
navigator.serviceWorker.register("/service_worker.js", { scope: "/" });
|
if ('serviceWorker' in navigator) {
|
||||||
|
navigator.serviceWorker.register("/service_worker.js", { scope: "/" });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue