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
merged 1 commit into from
Aug 26, 2020
Merged

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

merged 1 commit into from
Aug 26, 2020

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.

None yet

2 participants