Fix bug on Paddle-Node with returning all users

This commit is contained in:
Jan Oberhauser 2020-10-22 23:50:44 +02:00
parent 5f2d528046
commit b04769287d

View file

@ -58,8 +58,9 @@ export async function paddleApiRequestAllItems(this: IHookFunctions | IExecuteFu
do {
responseData = await paddleApiRequest.call(this, endpoint, method, body, query);
returnData.push.apply(returnData, responseData[propertyName]);
body.page++;
} while (
responseData[propertyName].length !== 0
responseData[propertyName].length !== 0 && responseData[propertyName].length === body.results_per_page
);
return returnData;