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 committed Oct 3, 2023
1 parent 4ca991d commit fd6c166
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

1 comment on commit fd6c166

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in fd6c166.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6389124843
📝 Reported issues:

Please sign in to comment.