Skip to content

Commit

Permalink
fix(shopify Node): fix pagination when empty fields are sent
Browse files Browse the repository at this point in the history
  • Loading branch information
Joffcom authored Sep 2, 2022
1 parent 82827d0 commit 071ab40
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/nodes-base/nodes/Shopify/GenericFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,18 @@ export async function shopifyApiRequestAllItems(
): Promise<any> {
const returnData: IDataObject[] = [];

/*
When paginating some parameters
(e.g. product:getAll -> title ) cannot
be empty in the query string, so remove
all the empty ones before paginating.
*/
for (const field in query) {
if (query[field] === '') {
delete query[field];
}
}

let responseData;

let uri: string | undefined;
Expand Down

0 comments on commit 071ab40

Please sign in to comment.