When trying to test out #52509, I noticed a weird behavior where the Site Editor will glitch and show a black screen if you trigger the Command Palette after selecting a block.
The console is logging:
Uncaught TypeError: Cannot read properties of null (reading 'toString')
at index.js:261:14
at Array.map (<anonymous>)
at AI (index.js:249:4)
at un (command-menu.js:36:39)
at St (react-dom.min.js?ver=18:1:47627)
at $s (react-dom.min.js?ver=18:1:120574)
at Sl (react-dom.min.js?ver=18:1:88649)
at kl (react-dom.min.js?ver=18:1:88577)
at bl (react-dom.min.js?ver=18:1:88440)
at sl (react-dom.min.js?ver=18:1:85264)
It happens when using Cmmd+K or when clicking on the button at the top bar. Triggering the palette in the post/page editor works fine.
Description
When trying to test out #52509, I noticed a weird behavior where the Site Editor will glitch and show a black screen if you trigger the Command Palette after selecting a block.
The console is logging:
It happens when using Cmmd+K or when clicking on the button at the top bar. Triggering the palette in the post/page editor works fine.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
https://github.com/WordPress/gutenberg/assets/14153300/070358e4-6e56-46ef-9314-35c7af87c072
Environment info
WordPress 6.3, GB 16.5
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes