-
-
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
NavLink not working without pathname #5977
Comments
We should add an invariant of some sort. |
No but Link (and NavLink) is working today with only search set. It will only set the query and leave the actual path as it is. In 4.2.2 NavLink is working fine with only search. As long as no special characters is used in the path |
That's because #5596 landed after 4.2.2 was released. But that brings up a good point. The check for a blank pathname would be better. |
Fixed in 6d9c425. Thanks! |
Great job |
Version
master (commit: e6f9017)
Test Case
https://codesandbox.io/s/3x3oxk33k6
Steps to reproduce
Add a NavLink without pathname, only search in the to object.
Expected Behavior
Classname active shall be added on all paths as long as the query matches the search value.
Actual Behavior
TypeError
Cannot read property 'replace' of undefined
Before escaping characters in path we need to verify that it's not null or undefined.
The text was updated successfully, but these errors were encountered: