-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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(useParams): fix issue with useParams reading from null object #6940
fix(useParams): fix issue with useParams reading from null object #6940
Conversation
fixed by returning empty object if route not mounted Closes #6938
@mjackson Is this what you envision being returned from |
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.
Needs a test.
I think returning |
Cool, I'm going to merge this in as-is. If it's not what was expected, I'll put in a fix myself. Thanks! |
This was released in 5.1.1 https://github.com/ReactTraining/react-router/releases/tag/v5.1.1 |
fixed by returning empty object if route not mounted
Closes #6938