Skip to content

Commit

Permalink
Don't display the navigation section in template parts details when a…
Browse files Browse the repository at this point in the history
… menu is missing (#54993)
  • Loading branch information
Mamaduka authored and mikachan committed Oct 4, 2023
1 parent 5c01d3d commit f112f14
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ export default function TemplatePartNavigationMenuListItem( { id } ) {
postType: NAVIGATION_POST_TYPE,
} );

if ( ! id ) return null;
if ( ! id || title === undefined ) {
return null;
}

return (
<SidebarNavigationItem withChevron { ...linkInfo }>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ export default function TemplatePartNavigationMenu( { id } ) {
id
);

if ( ! id ) return null;
if ( ! id || title === undefined ) {
return null;
}

return (
<>
Expand Down

0 comments on commit f112f14

Please sign in to comment.