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

Commit 405b83f

Browse files
committed
Pull out node data
1 parent 33a2ce2 commit 405b83f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

api/wordpress/_global/getPostTypeArchive.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ export default async function getPostTypeArchive(
7373
return null
7474
}
7575

76-
return posts.data[pluralType].edges
76+
// Flatten posts array to include inner node post data.
77+
return posts.data[pluralType].edges.map((post) => post.node)
7778
})
7879
.catch((error) => {
7980
response.error = true

0 commit comments

Comments
 (0)