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

Undocumented v6 breaking change: PrecacheController.install/active #2774

Closed
slorber opened this issue Mar 10, 2021 · 2 comments · Fixed by #2775
Closed

Undocumented v6 breaking change: PrecacheController.install/active #2774

slorber opened this issue Mar 10, 2021 · 2 comments · Fixed by #2775

Comments

@slorber
Copy link

slorber commented Mar 10, 2021

Hi,

Not 100% sure but it seems like in the code and TS typedefs, the PrecacheController install/activate methods now take the event as param, while it wasn't the case before.

Not passing the event lead to console errors after an upgrade:

image

Uncaught TypeError: Cannot read property 'waitUntil' of undefined

FYI the doc seems wrong to me and this is also not mentioned on the v5-v6 breaking changes, and might be useful to add/fix ;)

https://developers.google.com/web/tools/workbox/modules/workbox-precaching

@jeffposnick
Copy link
Contributor

Thank you for pointing this out—yes, PrecacheController does require an ExtendableEvent to be passed in as a parameter to both its install() and activate() methods in v6.

I'll get the JSDoc and other guidance updated to make it clear that this changed, and is a breaking change.

@slorber
Copy link
Author

slorber commented Mar 11, 2021

thanks :)

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 a pull request may close this issue.

2 participants