Skip to content

Commit eedf23f

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

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • lib/workbox/templates

lib/workbox/templates/sw.js

Lines changed: 2 additions & 2 deletions
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)