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(gatsby): Pass search/hash to location after swUpdated #32323

Merged
merged 7 commits into from
Jul 12, 2021

Conversation

nellaparedes
Copy link
Contributor

@nellaparedes nellaparedes commented Jul 10, 2021

Description

On the navigate function, when Gatbsy detects service worker has been updated, forces a hard reload stripping query params from the url

Documentation

Related Issues

Fixes #25889

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jul 10, 2021
@Auspicus
Copy link
Contributor

@nellaparedes I updated this to also address the issue with the hash getting dropped which was mentioned in #25889.

@LekoArts LekoArts added topic: core Relates to Gatsby's core (e.g. page loading, reporter, state machine) topic: plugins-PWA Issues related to PWA: the gatsby-plugin-offline and gatsby-plugin-manifest plugins and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Jul 12, 2021
@LekoArts LekoArts changed the title Prevent query parameters from being dropped on navigation after a service worker update fix(gatsby): Pass search/hash to location after swUpdated Jul 12, 2021
Copy link
Contributor

@LekoArts LekoArts left a comment

Choose a reason for hiding this comment

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

Thanks!

@LekoArts LekoArts merged commit 636df42 into gatsbyjs:master Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: core Relates to Gatsby's core (e.g. page loading, reporter, state machine) topic: plugins-PWA Issues related to PWA: the gatsby-plugin-offline and gatsby-plugin-manifest plugins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Page refresh loses hashes after service worker update
4 participants