Skip to content

Commit

Permalink
Fix lingering insertion point within template parts (#48913)
Browse files Browse the repository at this point in the history
* hide insertion point in view mode

* Fix selector
  • Loading branch information
youknowriad authored and Mamaduka committed Mar 14, 2023
1 parent f230fa4 commit d501e81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/block-editor/src/store/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -2806,12 +2806,12 @@ export function __unstableHasActiveBlockOverlayActive( state, clientId ) {
}

export function __unstableIsWithinBlockOverlay( state, clientId ) {
let parent = state.blocks.parents[ clientId ];
let parent = state.blocks.parents.get( clientId );
while ( !! parent ) {
if ( __unstableHasActiveBlockOverlayActive( state, parent ) ) {
return true;
}
parent = state.blocks.parents[ parent ];
parent = state.blocks.parents.get( parent );
}
return false;
}

0 comments on commit d501e81

Please sign in to comment.