Skip to content

Commit

Permalink
Fix root ID calculation when check if block can be transformed (#60167)
Browse files Browse the repository at this point in the history
Co-authored-by: jsnajdr <[email protected]>
Co-authored-by: mcsf <[email protected]>
Co-authored-by: annezazu <[email protected]>
Co-authored-by: youknowriad <[email protected]>
  • Loading branch information
5 people authored and bph committed Mar 26, 2024
1 parent fc77423 commit 01f32c8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/block-editor/src/components/block-switcher/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@ export const BlockSwitcher = ( { clientIds } ) => {
if ( ! _blocks.length || _blocks.some( ( block ) => ! block ) ) {
return { invalidBlocks: true };
}
const rootClientId = getBlockRootClientId( clientIds );
const rootClientId = getBlockRootClientId(
Array.isArray( clientIds ) ? clientIds[ 0 ] : clientIds
);
const [ { name: firstBlockName } ] = _blocks;
const _isSingleBlockSelected = _blocks.length === 1;
const blockType = getBlockType( firstBlockName );
Expand Down

0 comments on commit 01f32c8

Please sign in to comment.