diff --git a/packages/block-library/src/navigation-submenu/edit.js b/packages/block-library/src/navigation-submenu/edit.js index 20b13acab973f2..e6fcdc97907de4 100644 --- a/packages/block-library/src/navigation-submenu/edit.js +++ b/packages/block-library/src/navigation-submenu/edit.js @@ -348,8 +348,8 @@ export default function NavigationSubmenuEdit( { return { isAtMaxNesting: - getBlockParentsByBlockName( clientId, name ).length >= - maxNestingLevel, + getBlockParentsByBlockName( selectedBlockId, name ) + .length >= maxNestingLevel, isTopLevelItem: getBlockParentsByBlockName( clientId, name ).length === 0, isParentOfSelectedBlock: hasSelectedInnerBlock(