fix: Ensure params aren't copied between partial matches#124
Merged
rschristian merged 1 commit intomainfrom Sep 26, 2025
Merged
fix: Ensure params aren't copied between partial matches#124rschristian merged 1 commit intomainfrom
rschristian merged 1 commit intomainfrom
Conversation
rschristian
commented
Sep 25, 2025
| ...vnode.props, | ||
| path: rest, | ||
| query, | ||
| params: Object.assign({}, params), |
Member
Author
There was a problem hiding this comment.
This Object.assign() is the only change, rest is just formatting as that line was getting rather long & hard to read.
JoviDeCroock
approved these changes
Sep 26, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #123
Because each call of
execshared the sameparamsobj, partial matches could get carried between attempts to find a matching child.When trying to load
'/category/123/products/new', it'd test the first route, setting params up as{ id: '123' }, and when that failed, the sameparamsobject was passed to the second test. It of course would match, but the params object would end up as{ id: '123', categoryId: '123' }, keeping the incorrectidfrom the previous failed match.