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

Commit d5fa0e5

Browse files
author
Greg Rickaby
authored
Merge pull request #148 from WebDevStudios/fix/fix-query
Fix query reference
2 parents 68f22fb + 3e86cdd commit d5fa0e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

api/wordpress/_global/getPostTypeArchive.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const archiveQuerySeo = {
2929
* @param {string} cursor Start/end cursor for pagination.
3030
* @param {boolean} getNext Whether to retrieve next set of posts (true) or previous set (false).
3131
* @param {number} perPage Number of posts per page.
32-
* @return {object} Object containing Apollo client instance and post archive data or error object.
32+
* @return {object} Object containing Apollo client instance and post archive data or error object.
3333
*/
3434
export default async function getPostTypeArchive(
3535
postType,
@@ -40,7 +40,7 @@ export default async function getPostTypeArchive(
4040
perPage = 10
4141
) {
4242
// Retrieve post type query.
43-
const query = archiveQuerySeo?.[postType] ?? null
43+
const query = archiveQuerySeo?.[postType]?.query ?? null
4444

4545
// Get/create Apollo instance.
4646
const apolloClient = initializeWpApollo()

0 commit comments

Comments
 (0)