Skip to content

Commit

Permalink
Navigation: Only fetch wp_navigation menus once
Browse files Browse the repository at this point in the history
  • Loading branch information
scruffian committed Mar 16, 2023
1 parent 55e16d3 commit 81e9999
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/block-library/src/navigation/use-navigation-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ function selectNavigationMenus( select ) {
const args = [
'postType',
'wp_navigation',
{ per_page: -1, status: [ 'publish', 'draft' ] },
{ per_page: -1, status: 'publish,draft' },
];

return {
navigationMenus: getEntityRecords( ...args ),
isResolvingNavigationMenus: isResolving( 'getEntityRecords', args ),
Expand Down

0 comments on commit 81e9999

Please sign in to comment.