Skip to content
This repository was archived by the owner on Feb 27, 2024. It is now read-only.

Commit 299a2f7

Browse files
committed
Fix menu query
1 parent f53af45 commit 299a2f7

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

api/wordpress/_partials/allMenus.js

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
// Query partial: retrieve all menus.
22
const allMenus = `
33
menus {
4-
edges {
5-
node {
6-
locations
7-
menuItems {
8-
nodes {
9-
id
10-
parentId
11-
label
12-
path
13-
target
14-
title
15-
}
4+
nodes {
5+
locations
6+
menuItems {
7+
nodes {
8+
id
9+
parentId
10+
label
11+
path
12+
target
13+
title
1614
}
1715
}
1816
}

api/wordpress/menus/getMenus.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default function getMenus(menus, locations = menuLocations) {
1717
}
1818

1919
// Filter returned menus by specific menu location.
20-
const filteredMenus = filterMenusByLocation(menus?.edges?.nodes, locations)
20+
const filteredMenus = filterMenusByLocation(menus?.nodes, locations)
2121

2222
return filteredMenus || []
2323
}

0 commit comments

Comments
 (0)