From d22c0deea43a5b0e33de5766f252e06f0d2de718 Mon Sep 17 00:00:00 2001 From: Jan Oberhauser Date: Mon, 24 Jan 2022 17:20:27 +0100 Subject: [PATCH] :zap: ERPNext do not error if no data found --- packages/nodes-base/nodes/ERPNext/GenericFunctions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nodes-base/nodes/ERPNext/GenericFunctions.ts b/packages/nodes-base/nodes/ERPNext/GenericFunctions.ts index 72d1d67e4e..0f45ae5296 100644 --- a/packages/nodes-base/nodes/ERPNext/GenericFunctions.ts +++ b/packages/nodes-base/nodes/ERPNext/GenericFunctions.ts @@ -89,7 +89,7 @@ export async function erpNextApiRequestAllItems( returnData.push.apply(returnData, responseData[propertyName]); query!.limit_start += query!.limit_page_length - 1; } while ( - responseData.data.length > 0 + responseData.data && responseData.data.length > 0 ); return returnData;