diff --git a/packages/block-library/src/block/edit.js b/packages/block-library/src/block/edit.js index 19d1f8196df509..607f073323d996 100644 --- a/packages/block-library/src/block/edit.js +++ b/packages/block-library/src/block/edit.js @@ -27,7 +27,7 @@ import { store as blockEditorStore, BlockControls, } from '@wordpress/block-editor'; -import { getBlockSupport, parse } from '@wordpress/blocks'; +import { getBlockSupport, parse, cloneBlock } from '@wordpress/blocks'; /** * Internal dependencies @@ -205,7 +205,8 @@ export default function ReusableBlockEdit( { // Apply the initial overrides from the pattern block to the inner blocks. useEffect( () => { const initialBlocks = - editedRecord.blocks ?? + // Clone the blocks to generate new client IDs. + editedRecord.blocks?.map( ( block ) => cloneBlock( block ) ) ?? ( editedRecord.content && typeof editedRecord.content !== 'function' ? parse( editedRecord.content ) : [] );