mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 06:34:05 -08:00
fix(shopify Node): fix pagination when empty fields are sent
This commit is contained in:
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;
|
||||||
|
|
Loading…
Reference in a new issue