diff --git a/src/serviceWorkerLoader.ts b/src/serviceWorkerLoader.ts index c10f3dc..6099eab 100644 --- a/src/serviceWorkerLoader.ts +++ b/src/serviceWorkerLoader.ts @@ -68,7 +68,7 @@ export function register(config?: Config) { function registerValidSW(swUrl: string, config?: Config) { navigator.serviceWorker .register(swUrl, { - scope: window.location.pathname + scope: window.location.pathname.endsWith("/") ? window.location.pathname : window.location.pathname + "/" }) .then((registration) => { registration.onupdatefound = () => {