Skip to content

Commit

Permalink
Ensure that no children are returned if either menus array is nil (#3…
Browse files Browse the repository at this point in the history
  • Loading branch information
getdave authored and andrewserong committed Nov 10, 2021
1 parent cd3ce67 commit 885dc53
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -48,7 +48,7 @@ const ExistingMenusDropdown = ( {
<>
<MenuGroup label={ __( 'Menus' ) }>
{ canSwitchNavigationMenu &&
navigationMenus.map( ( menu ) => {
navigationMenus?.map( ( menu ) => {
return (
<MenuItem
onClick={ () => {
Expand All @@ -64,7 +64,7 @@ const ExistingMenusDropdown = ( {
} ) }
</MenuGroup>
<MenuGroup label={ __( 'Classic Menus' ) }>
{ menus.map( ( menu ) => {
{ menus?.map( ( menu ) => {
return (
<MenuItem
onClick={ () => {
Expand Down

0 comments on commit 885dc53

Please sign in to comment.