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

Use newly-public routes property on Router class instead of private one #102

Merged
merged 2 commits into from
Nov 8, 2018

Conversation

westonruter
Copy link
Collaborator

Regression introduced in #98.

This will fix this error being raised when using production build of Workbox:

image

This error is caused by the production version of Workbox munging the _routes property of the Router class:

https://github.com/xwp/pwa-wp/blob/1efb6a9243f2e1a1eaab264d8f1fe82e3d029831/wp-includes/js/service-worker.js#L25

Workbox v4 will make this private _routes into public routes. When this happens upstream, this PR needs to be updated with the new build.

@westonruter
Copy link
Collaborator Author

Depends on GoogleChrome/workbox#1747

@westonruter westonruter changed the title [WIP] Use newly-public routes property on Router class instead of private one Use newly-public routes property on Router class instead of private one Nov 7, 2018
Copy link
Contributor

@miina miina left a comment

Choose a reason for hiding this comment

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

Works!

@westonruter westonruter merged commit 49ea9c0 into master Nov 8, 2018
@westonruter westonruter deleted the fix/custom-router-lookup branch November 8, 2018 00:12
@westonruter westonruter added this to the 0.2 milestone Apr 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants