diff --git a/packages/block-library/src/navigation/edit/unsaved-inner-blocks.js b/packages/block-library/src/navigation/edit/unsaved-inner-blocks.js index 98a16a5b2c06bb..6e1981ff1b9dbd 100644 --- a/packages/block-library/src/navigation/edit/unsaved-inner-blocks.js +++ b/packages/block-library/src/navigation/edit/unsaved-inner-blocks.js @@ -97,11 +97,18 @@ export default function UnsavedInnerBlocks( { return EMPTY_OBJECT; } - const { hasFinishedResolution, isSavingEntityRecord } = - select( coreStore ); + const { + getEntityRecords, + hasFinishedResolution, + isSavingEntityRecord, + } = select( coreStore ); return { isSaving: isSavingEntityRecord( 'postType', 'wp_navigation' ), + draftNavigationMenus: getEntityRecords( + // This is needed so that hasResolvedDraftNavigationMenus gives the correct status. + ...DRAFT_MENU_PARAMS + ), hasResolvedDraftNavigationMenus: hasFinishedResolution( 'getEntityRecords', DRAFT_MENU_PARAMS @@ -144,8 +151,8 @@ export default function UnsavedInnerBlocks( { isSaving, hasResolvedDraftNavigationMenus, hasResolvedNavigationMenus, - hasSelection, innerBlocksAreDirty, + hasSelection, ] ); const Wrapper = isSaving ? Disabled : 'div';