mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix(shopify Node): fix pagination when empty fields are sent
This commit is contained in:
committed by
GitHub
parent
82827d0a12
commit
071ab40c9f
@@ -88,6 +88,18 @@ export async function shopifyApiRequestAllItems(
|
|||||||
): Promise<any> {
|
): Promise<any> {
|
||||||
const returnData: IDataObject[] = [];
|
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 responseData;
|
||||||
|
|
||||||
let uri: string | undefined;
|
let uri: string | undefined;
|
||||||
|
|||||||
Reference in New Issue
Block a user