Add undefined clientID case to isBlockSelected selector#29377
Add undefined clientID case to isBlockSelected selector#29377
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
isBlockSelectedfrom 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-rendererlibrary, 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: