Skip to content

Commit eedf23f

Browse files
authoredAug 26, 2020
fix(workbox): missing required parameter request for handle() (#335)
1 parent dc82345 commit eedf23f

File tree

1 file changed

+2
-2
lines changed
  • lib/workbox/templates

1 file changed

+2
-2
lines changed
 

‎lib/workbox/templates/sw.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ workbox.precaching.precacheAndRoute(<%= JSON.stringify(options.preCaching, null,
6262

6363
<% if (options.offlinePage) { %>
6464
// Register router handler for offlinePage
65-
workbox.routing.registerRoute(new RegExp('<%= options.pagesURLPattern %>'), ({event}) => {
66-
return new workbox.strategies.<%= options.offlineStrategy %>().handle({event})
65+
workbox.routing.registerRoute(new RegExp('<%= options.pagesURLPattern %>'), ({request,event}) => {
66+
return new workbox.strategies.<%= options.offlineStrategy %>().handle({request,event})
6767
.catch(() => caches.match('<%= options.offlinePage %>'))
6868
})<% } %>
6969

0 commit comments

Comments
 (0)
Please sign in to comment.