Skip to content

Commit

Permalink
mergeBlocks: remove unused MERGE_BLOCKS action (#59125)
Browse files Browse the repository at this point in the history
Co-authored-by: jsnajdr <jsnajdr@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
  • Loading branch information
3 people committed Feb 26, 2024
1 parent 372308e commit a4fdeb2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
6 changes: 2 additions & 4 deletions packages/block-editor/src/store/actions.js
Expand Up @@ -924,10 +924,8 @@ export const __unstableExpandSelection =
export const mergeBlocks =
( firstBlockClientId, secondBlockClientId ) =>
( { registry, select, dispatch } ) => {
const blocks = [ firstBlockClientId, secondBlockClientId ];
dispatch( { type: 'MERGE_BLOCKS', blocks } );

const [ clientIdA, clientIdB ] = blocks;
const clientIdA = firstBlockClientId;
const clientIdB = secondBlockClientId;
const blockA = select.getBlock( clientIdA );
const blockAType = getBlockType( blockA.name );

Expand Down
4 changes: 0 additions & 4 deletions packages/block-editor/src/store/test/actions.js
Expand Up @@ -832,10 +832,6 @@ describe( 'actions', () => {
blockB.clientId
)( { select, dispatch } );

expect( dispatch ).toHaveBeenCalledWith( {
type: 'MERGE_BLOCKS',
blocks: [ blockA.clientId, blockB.clientId ],
} );
expect( dispatch.selectBlock ).toHaveBeenCalledWith( 'chicken' );
} );

Expand Down

0 comments on commit a4fdeb2

Please sign in to comment.