update pwa scope

pull/134/head
Vladimir Mandic 2021-05-30 18:00:51 -04:00
parent f8104569ec
commit b580ac2c3b
1 changed files with 1 additions and 1 deletions

View File

@ -681,7 +681,7 @@ async function pwaRegister() {
if (reg.scope.startsWith(location.origin)) found = reg;
}
if (!found) {
const reg = await navigator.serviceWorker.register(pwa.scriptFile, { scope: '/' });
const reg = await navigator.serviceWorker.register(pwa.scriptFile, { scope: location.pathname });
found = reg;
log('pwa registered:', reg.scope);
}