-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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
Regression: empty string paths no longer match #6941
Comments
Could you submit a PR to fix this? |
This was released in 5.1.1 https://github.com/ReactTraining/react-router/releases/tag/v5.1.1 |
This was referenced Oct 6, 2019
[Snyk] Upgrade react-router-dom from 5.0.1 to 5.1.1
digitalmgmt2022/middle-reactjs-easy-sampletask#3
Open
This was referenced Oct 26, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
https://github.com/ReactTraining/react-router/blob/0c058adc5b56c6d9b409af5e4d8330c645fac00c/packages/react-router/modules/matchPath.js#L38
Broken by 7bd1407 (#6715)
It is possible to have an empty-string path. Prior to the breaking change this would essentially match anything.
I changed the check to be more specific:
I confirmed the above changes fixed the issue for my app.
I was relying on empty-string paths in my app to enable a custom route config where I needed a conceptual route that always matched. Upgrading to v5.0.1 broke my app and I couldn't figure out why.
The text was updated successfully, but these errors were encountered: