Skip to content

Commit

Permalink
Block Editor: Fix regression for root appender logic (WordPress#68994)
Browse files Browse the repository at this point in the history
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
  • Loading branch information
3 people authored Feb 3, 2025
1 parent be0e151 commit 1495560
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/block-editor/src/components/block-list/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,11 @@ function Items( {
getDefaultBlockName(),
rootClientId
) );
const hasSelectedRoot = !! (
rootClientId &&
selectedBlockClientId &&
rootClientId === selectedBlockClientId
);

return {
order: _order,
Expand All @@ -214,8 +219,8 @@ function Items( {
hasAppender &&
! _isZoomOut() &&
( hasCustomAppender ||
showRootAppender ||
rootClientId === selectedBlockClientId ),
hasSelectedRoot ||
showRootAppender ),
};
},
[ rootClientId, hasAppender, hasCustomAppender ]
Expand Down

0 comments on commit 1495560

Please sign in to comment.