-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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 other code paths for resolveTo from a splat route #11045
Conversation
🦋 Changeset detectedLatest commit: 2b06e27 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
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 |
idx === matches.length - 1 ? match.pathname : match.pathnameBase | ||
) | ||
); | ||
let routePathnamesJson = JSON.stringify(getResolveToMatches(matches)); |
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.
This change on line 319 was only made in the one code path before. To avoid this same mistake in the future, we're now using a utility getResolveToMatches
to share this logic.
@@ -138,7 +138,7 @@ describe("path resolution", () => { | |||
path: "*", | |||
}, | |||
], | |||
"/foo", | |||
"/foo/bar", |
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.
Similar to #10983, we had a test here asserting the previously buggy behavior. A link to "." from a splat should stay on the current location, not route up to the parent
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
* Fix other code paths for resolveTo from a splat route * Bump bundle
This reverts commit 58d421f.
* Revert "Fix other code paths for resolveTo from a splat route (#11045)" This reverts commit 58d421f. * Revert "Add additional test case for #10983" This reverts commit f320378. * Revert "Fix issues with useFormAction/useResolvedPath for dot paths in param/splat routes (#10983)" This reverts commit fe066bd. * Fix test * Add changeset
Follow up to #10983 to handle other code paths calling
getPathContributingMatches
/resolveTo
Closes #11038