Scope service worker to root, to allow it to catch NIPSWeb

This commit is contained in:
Marks Polakovs 2020-05-09 17:30:52 +02:00
parent 08e571e024
commit 47b3c7ed01

View file

@ -68,7 +68,7 @@ export function register(config?: Config) {
function registerValidSW(swUrl: string, config?: Config) {
navigator.serviceWorker
.register(swUrl, {
scope: window.location.pathname.endsWith("/") ? window.location.pathname : window.location.pathname + "/"
scope: "/"
})
.then((registration) => {
registration.onupdatefound = () => {