There was an error while loading. Please reload this page.
handle()
1 parent dc82345 commit eedf23fCopy full SHA for eedf23f
1 file changed
lib/workbox/templates/sw.js
@@ -62,8 +62,8 @@ workbox.precaching.precacheAndRoute(<%= JSON.stringify(options.preCaching, null,
62
63
<% if (options.offlinePage) { %>
64
// Register router handler for offlinePage
65
-workbox.routing.registerRoute(new RegExp('<%= options.pagesURLPattern %>'), ({event}) => {
66
- return new workbox.strategies.<%= options.offlineStrategy %>().handle({event})
+workbox.routing.registerRoute(new RegExp('<%= options.pagesURLPattern %>'), ({request,event}) => {
+ return new workbox.strategies.<%= options.offlineStrategy %>().handle({request,event})
67
.catch(() => caches.match('<%= options.offlinePage %>'))
68
})<% } %>
69
0 commit comments