-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix: fulfil beforeNavigate complete when redirected
#12896
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
Conversation
🦋 Changeset detectedLatest commit: 8ddcbc4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
beforeNavigate navigation when redirectedbeforeNavigate complete when redirected
|
While this fixes the issue, I'm wondering if the navigation timing is correct, as it will return before the redirect finishes. There's arguments in various directions:
|
I think 2 is definitely out because redirection doesn't fit the description of "navigation fails or is aborted".
Between 1 and 3, I think 1 wins over 3 because |
|
I think we can just fulfil the promise after the redirect has completed. Pushed that change. It did reveal a type error around |
fixes #12486
This PR fixes the issue where redirecting causes our internal navigation function to return early and forgets to fulfil the
nav.completepromise. We simply need to fulfil the promise after redirecting.Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.Edits