Skip to content

Commit

Permalink
Fix offline precaching due to revision query parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastienTainon committed Mar 3, 2022
1 parent 79322c1 commit 8131e06
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion templates/workbox/sw.js
Expand Up @@ -96,7 +96,7 @@ function offlinePage(workbox, options) {
const strategy = new workbox.strategies[options.offlineStrategy]
return strategy
.handle({ request, event })
.catch(() => caches.match(options.offlinePage))
.catch(() => caches.matchPrecache(options.offlinePage))
})
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/__snapshots__/pwa.test.js.snap
Expand Up @@ -200,7 +200,7 @@ function offlinePage(workbox, options) {
const strategy = new workbox.strategies[options.offlineStrategy]
return strategy
.handle({ request, event })
.catch(() => caches.match(options.offlinePage))
.catch(() => caches.matchPrecache(options.offlinePage))
})
}
}
Expand Down

0 comments on commit 8131e06

Please sign in to comment.