-
-
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
Fix useLocation to receive 0 instead of null when state is set to 0 #11495
Conversation
🦋 Changeset detectedLatest commit: adaeedf The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Wouldn't it be better to use the nullish coalescing operator here?
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing |
Thanks!! I'll apply it :) |
Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳 |
Could you add a unit test to |
I added it!! @brophdawg11 |
Thanks - now I think we just need a changeset and this should be good to merge. Just run |
I created changeset and commited it. @brophdawg11 |
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
Fixes #11448
I fixed location's state property value like this.
Now, useLocation receive 0 instead of null when state is set to 0.