Skip to content

Commit 82df675

Browse files
fix: offline precaching due to revision query parameter
1 parent 79322c1 commit 82df675

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

templates/workbox/sw.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ function offlinePage(workbox, options) {
9696
const strategy = new workbox.strategies[options.offlineStrategy]
9797
return strategy
9898
.handle({ request, event })
99-
.catch(() => caches.match(options.offlinePage))
99+
.catch(() => caches.matchPrecache(options.offlinePage))
100100
})
101101
}
102102
}

test/__snapshots__/pwa.test.js.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ function offlinePage(workbox, options) {
200200
const strategy = new workbox.strategies[options.offlineStrategy]
201201
return strategy
202202
.handle({ request, event })
203-
.catch(() => caches.match(options.offlinePage))
203+
.catch(() => caches.matchPrecache(options.offlinePage))
204204
})
205205
}
206206
}

0 commit comments

Comments
 (0)