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(serviceworker): Fix service worker not registering #270

Merged
merged 1 commit into from
Sep 17, 2022

Conversation

Hanziness
Copy link
Owner

Sometimes the service worker registration code (that used the load window event) was registered after the document was loaded, causing the service worker not to register. This PR makes the registration code more robust by first checking document.readyState.

@Hanziness Hanziness added the bug 🐛 Something isn't working label Sep 17, 2022
@Hanziness Hanziness merged commit 4fc8e4d into develop Sep 17, 2022
@Hanziness Hanziness deleted the fix-sw-load branch September 17, 2022 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant