-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Add undefined clientID case to isBlockSelected selector #29377
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
Conversation
Size Change: +2 B (0%) Total Size: 1.39 MB
ℹ️ View Unchanged
|
Great debugging! |
Technically, if you ask if |
Calling the function with an |
This would be my choice too. |
I agree that the Meanwhile I'm going to close this PR. Thanks for your feedback 🙇 ! |
@fluiddot Thanks! Let me know when you have a new PR for a swift review and merge. |
Description
When I was testing the changes from PR, I realised that the selector
isBlockSelected
from the store of the block editor package is not handling properly the case receiving an undefinedclientId
.This case is probably an edge case for the editor but not for the native unit tests that render the blocks via the
react-test-renderer
library, in this case the blocks don't have aclientId
.How has this been tested?
This has been tested by adding a new unit test for this case and running
npm run test
.Additionally this change has been tested too in the mentioned PR that originated the fix by running
npm run native test
.Screenshots
N/A
Types of changes
Bug fix
Checklist: