From 4e0893b86c67307e930f1c88c29947bfcb288c63 Mon Sep 17 00:00:00 2001 From: Jorge Costa Date: Tue, 28 Jun 2022 21:52:32 +0100 Subject: [PATCH] Fix: Double condition on or on block editor reducer (#42019) --- packages/block-editor/src/store/reducer.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/block-editor/src/store/reducer.js b/packages/block-editor/src/store/reducer.js index 08e30143dd85b..bc5c181c2fe05 100644 --- a/packages/block-editor/src/store/reducer.js +++ b/packages/block-editor/src/store/reducer.js @@ -398,13 +398,12 @@ const withBlockTree = const updatedBlockUids = []; if ( action.fromRootClientId ) { updatedBlockUids.push( action.fromRootClientId ); + } else { + updatedBlockUids.push( '' ); } if ( action.toRootClientId ) { updatedBlockUids.push( action.toRootClientId ); } - if ( ! action.fromRootClientId || ! action.fromRootClientId ) { - updatedBlockUids.push( '' ); - } newState.tree = updateParentInnerBlocksInTree( newState, newState.tree,