From f61c6270a78a65f01957f032013ae56ef504ebfe Mon Sep 17 00:00:00 2001 From: scruffian Date: Tue, 16 May 2023 16:36:30 +0100 Subject: [PATCH] revert --- .../block-library/src/navigation/edit/leaf-more-menu.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/block-library/src/navigation/edit/leaf-more-menu.js b/packages/block-library/src/navigation/edit/leaf-more-menu.js index 195425adbeb1f1..f57335ce2bef60 100644 --- a/packages/block-library/src/navigation/edit/leaf-more-menu.js +++ b/packages/block-library/src/navigation/edit/leaf-more-menu.js @@ -29,12 +29,9 @@ function AddSubmenuItem( { block, onClose, expandedState, expand } ) { useDispatch( blockEditorStore ); const clientId = block.clientId; - const blockName = useSelect( - ( select ) => select( blockEditorStore ).getBlockName( clientId ), - [ clientId ] + const isDisabled = ! BLOCKS_THAT_CAN_BE_CONVERTED_TO_SUBMENU.includes( + block.name ); - const isDisabled = - ! BLOCKS_THAT_CAN_BE_CONVERTED_TO_SUBMENU.includes( blockName ); return (