diff --git a/packages/block-library/src/navigation/edit.js b/packages/block-library/src/navigation/edit.js index 0796971e8f9a1a..d4b6cd57b497b5 100644 --- a/packages/block-library/src/navigation/edit.js +++ b/packages/block-library/src/navigation/edit.js @@ -197,10 +197,15 @@ export default compose( [ const selectedBlockHasDescendants = !! getClientIdsOfDescendants( [ selectedBlockId, ] )?.length; + return { isImmediateParentOfSelectedBlock, selectedBlockHasDescendants, hasExistingNavItems: !! innerBlocks.length, + + // This prop is already available but computing it here ensures it's + // fresh compared to isImmediateParentOfSelectedBlock + isSelected: selectedBlockId === clientId, }; } ), withDispatch( ( dispatch, { clientId } ) => {