From 25bf1512eece81be7f892897811aac1209c006ff Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Tue, 9 Nov 2021 17:33:49 +0000 Subject: [PATCH] Ensure that no children are returned if either menus array is nil --- .../block-library/src/navigation/edit/placeholder/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/block-library/src/navigation/edit/placeholder/index.js b/packages/block-library/src/navigation/edit/placeholder/index.js index a245a932c214ce..2c7155fdf81c14 100644 --- a/packages/block-library/src/navigation/edit/placeholder/index.js +++ b/packages/block-library/src/navigation/edit/placeholder/index.js @@ -48,7 +48,7 @@ const ExistingMenusDropdown = ( { <> { canSwitchNavigationMenu && - navigationMenus.map( ( menu ) => { + navigationMenus?.map( ( menu ) => { return ( { @@ -64,7 +64,7 @@ const ExistingMenusDropdown = ( { } ) } - { menus.map( ( menu ) => { + { menus?.map( ( menu ) => { return ( {