Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(workbox): missing required parameter request for handle() #335

merged 1 commit into from Aug 26, 2020

fix(workbox): missing required parameter request for handle() #335

merged 1 commit into from Aug 26, 2020


Copy link

@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.

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.

pi0 approved these changes Aug 26, 2020
Copy link

@pi0 pi0 left a comment

Perfect thanks! 👍

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

pi0 commented Aug 26, 2020

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

Successfully merging this pull request may close these issues.

None yet

2 participants