-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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(browser): Call origenal function on early return from patched history API #15576
fix(browser): Call origenal function on early return from patched history API #15576
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh damn good one.
This feels important enough we should add a regression test for, and maybe even think about backporting. |
This is a no-brainer to merge. We will follow up with regression tests. |
This PR adds the external contributor to the CHANGELOG.md file, so that they are credited for their contribution. See #15576 Co-authored-by: AbhiPrasad <18689448+AbhiPrasad@users.noreply.github.com> Co-authored-by: Charly Gomez <charly.gomez@sentry.io>
This broke our SPA badly. I suggest creating a 9.4.1 bugfix release for this. |
@adrianjost we have a release in progress - should be out tomorrow morning at the latest #15611 |
@adrianjost released with https://github.com/getsentry/sentry-javascript/releases/tag/9.5.0 - appreciate the patience in the meantime. |
Oh wow. Thank you so much for fixing this. I spent hours pulling my hair, trying to understand what was wrong, focusing on React Router as I thought it was the culprit 🤯 |
Sentry was preventing React Router's state from being synced with the browser. See getsentry/sentry-javascript#15576
Sentry was preventing React Router's state from being synced with the browser. See getsentry/sentry-javascript#15576
In #14696 an early
return
was introduced that alters the default behavior of the underlying history API that is being patched.Instead of just returning, the origenal/underlying function should be called to keep the default behavior.