diff --git a/packages/block-editor/src/components/block-actions/index.js b/packages/block-editor/src/components/block-actions/index.js index 760f0f4daabde9..2b3c883dfc367a 100644 --- a/packages/block-editor/src/components/block-actions/index.js +++ b/packages/block-editor/src/components/block-actions/index.js @@ -98,16 +98,10 @@ export default function BlockActions( { return removeBlocks( clientIds, updateSelection ); }, onInsertBefore() { - const clientId = Array.isArray( clientIds ) - ? clientIds[ 0 ] - : clientId; - insertBeforeBlock( clientId ); + insertBeforeBlock( clientIds[ 0 ] ); }, onInsertAfter() { - const clientId = Array.isArray( clientIds ) - ? clientIds[ clientIds.length - 1 ] - : clientId; - insertAfterBlock( clientId ); + insertAfterBlock( clientIds[ clientIds.length - 1 ] ); }, onMoveTo() { setNavigationMode( true ); diff --git a/packages/block-editor/src/components/block-settings-menu/block-settings-dropdown.js b/packages/block-editor/src/components/block-settings-menu/block-settings-dropdown.js index 73454768c06b04..5630bdedf06b94 100644 --- a/packages/block-editor/src/components/block-settings-menu/block-settings-dropdown.js +++ b/packages/block-editor/src/components/block-settings-menu/block-settings-dropdown.js @@ -46,18 +46,15 @@ function CopyMenuItem( { clientIds, onCopy, label } ) { export function BlockSettingsDropdown( { block, clientIds, - __experimentalSelectBlock, children, + __experimentalSelectBlock, __unstableDisplayLocation, ...props } ) { // Get the client id of the current block for this menu, if one is set. const currentClientId = block?.clientId; - const blockClientIds = Array.isArray( clientIds ) - ? clientIds - : [ clientIds ]; - const count = blockClientIds.length; - const firstBlockClientId = blockClientIds[ 0 ]; + const count = clientIds.length; + const firstBlockClientId = clientIds[ 0 ]; const { firstParentClientId, onlyBlock,