ERPNext do not error if no data found

This commit is contained in:
Jan Oberhauser 2022-01-24 17:20:27 +01:00
parent daf91a1228
commit d22c0deea4

View file

@ -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;