fix(Microsoft Excel Node): fix issue with pagination when getting all items (#4247)

This commit is contained in:
Jonathan Bennetts 2022-10-03 10:47:31 +01:00 committed by GitHub
parent 4595b54e56
commit 1067ec0f5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,6 +53,9 @@ export async function microsoftApiRequestAllItems(
do {
responseData = await microsoftApiRequest.call(this, method, endpoint, body, query, uri);
uri = responseData['@odata.nextLink'];
if (uri && uri.includes('$top')) {
delete query['$top'];
}
returnData.push.apply(returnData, responseData[propertyName]);
} while (responseData['@odata.nextLink'] !== undefined);