Skip to content

Conversation

@Yihao-G
Copy link
Contributor

@Yihao-G Yihao-G commented Aug 26, 2020

According to the Workbox Migration Guide:

In v5, handle() treats request as a required parameter, and will not fall back to using event.request. Make sure that you pass in a valid request when calling handle().1

However, our sw.js template only passes event parameter.

This causes websites with offlinePage setup always redirects to the offline page.

This pull request fixes it.

1. However, the reference docs seems have not been updated.

@codecov
Copy link

codecov bot commented Aug 26, 2020

Codecov Report

Merging #335 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #335   +/-   ##
=======================================
  Coverage   85.43%   85.43%           
=======================================
  Files          10       10           
  Lines         357      357           
  Branches      108      108           
=======================================
  Hits          305      305           
  Misses         48       48           
  Partials        4        4           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dc82345...b7a6773. Read the comment docs.

Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect thanks! 👍

@pi0 pi0 merged commit eedf23f into nuxt-community:master Aug 26, 2020
@pi0
Copy link
Member

pi0 commented Aug 26, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants