This commit is contained in:
Marks Polakovs 2020-05-09 17:01:45 +02:00
parent 80b2f67975
commit 41e560a4d5

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
scope: window.location.pathname.endsWith("/") ? window.location.pathname : window.location.pathname + "/"
})
.then((registration) => {
registration.onupdatefound = () => {