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 82df675
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 82df675

Please sign in to comment.