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

Pick up dashes in dynamic parameter names #11160

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

brophdawg11
Copy link
Contributor

@brophdawg11 brophdawg11 commented Jan 3, 2024

Fix bug where dashes were not picked up as part of the dynamic parameter name:

// A URL `/whatever` should match with `useParams()["foo-bar"] === "whatever"`
let routes = { path: ":foo-bar" };

Without this, the portion after the dash was being incorrectly scored/counted as a static segment, and we only support dynamic parameters as the full URL (#9506)

Closes #11159

@brophdawg11 brophdawg11 merged commit d103537 into dev Jan 9, 2024
3 checks passed
@brophdawg11 brophdawg11 deleted the brophdawg11/dynamic-param-dash branch January 9, 2024 15:50
Copy link
Contributor

github-actions bot commented Jan 9, 2024

🤖 Hello there,

We just published version 6.21.2-pre.0 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

Copy link
Contributor

🤖 Hello there,

We just published version 6.21.2 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Routes formatted as $foo-bar are being prioritised over routes formatted as foo-bar.
1 participant