Skip to content

Commit baaa9bc

Browse files
committed
Fix incorrect block editing mode assigned in some cases
1 parent c42f8a7 commit baaa9bc

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

packages/block-editor/src/store/reducer.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2307,12 +2307,7 @@ function getDerivedBlockEditingModesForTree(
23072307
let ancestorBlockEditingMode;
23082308
let parent = state.blocks.parents.get( clientId );
23092309
while ( parent !== undefined ) {
2310-
// There's a chance we only just calculated this for the parent,
2311-
// if so we can return that value for a faster lookup.
2312-
if ( derivedBlockEditingModes.has( parent ) ) {
2313-
ancestorBlockEditingMode =
2314-
derivedBlockEditingModes.get( parent );
2315-
} else if ( state.blockEditingModes.has( parent ) ) {
2310+
if ( state.blockEditingModes.has( parent ) ) {
23162311
// Checking the explicit block editing mode will be slower,
23172312
// as the block editing mode is more likely to be set on a
23182313
// distant ancestor.

0 commit comments

Comments
 (0)