From 6afe9e04f15a7a4c1c9f9a389b3100f1bcb474a1 Mon Sep 17 00:00:00 2001 From: Staci Cooper Date: Wed, 23 Feb 2022 09:39:25 -0800 Subject: [PATCH] Correctly exclude noncopyable attrs in duplicate --- packages/block-editor/src/store/actions.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/block-editor/src/store/actions.js b/packages/block-editor/src/store/actions.js index 89f86edd552fa..54774f8fabc22 100644 --- a/packages/block-editor/src/store/actions.js +++ b/packages/block-editor/src/store/actions.js @@ -1181,7 +1181,9 @@ export const duplicateBlocks = ( clientIds, updateSelection = true ) => ( { last( castArray( clientIds ) ) ); const clonedBlocks = blocks.map( ( block ) => - cloneBlock( block, {}, null, { retainCopyAttributes: false } ) + cloneBlock( block, {}, null, { + __experimentalExcludeNonCopyableAttributes: true, + } ) ); dispatch.insertBlocks( clonedBlocks,