Skip to content

Commit

Permalink
Release v1.5.12
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksandrRogov committed Nov 9, 2019
1 parent 449e287 commit 76b132d
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 14 deletions.
17 changes: 13 additions & 4 deletions dist/dynamics-web-api-callbacks.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! dynamics-web-api-callbacks v1.5.11 (c) 2019 Aleksandr Rogov */
/*! dynamics-web-api-callbacks v1.5.12 (c) 2019 Aleksandr Rogov */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
Expand Down Expand Up @@ -1778,11 +1778,20 @@ function DynamicsWebApi(config) {
var internalSuccessCallback = function (response) {
records = records.concat(response.value);

if (response.oDataNextLink) {
_retrieveAllRequest(request, successCallback, errorCallback, response.oDataNextLink, records);
var pageLink = response.oDataNextLink;

if (pageLink) {
_retrieveAllRequest(request, successCallback, errorCallback, pageLink, records);
}
else {
successCallback({ value: records });
var result = { value: records };

if (response.oDataDeltaLink) {
result["@odata.deltaLink"] = response.oDataDeltaLink;
result.oDataDeltaLink = response.oDataDeltaLink;
}

successCallback(result);
}
};

Expand Down
4 changes: 2 additions & 2 deletions dist/dynamics-web-api-callbacks.min.js

Large diffs are not rendered by default.

17 changes: 13 additions & 4 deletions dist/dynamics-web-api.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! dynamics-web-api v1.5.11 (c) 2019 Aleksandr Rogov */
/*! dynamics-web-api v1.5.12 (c) 2019 Aleksandr Rogov */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
Expand Down Expand Up @@ -1331,11 +1331,20 @@ function DynamicsWebApi(config) {
return retrieveMultipleRequest(request, nextPageLink).then(function (response) {
records = records.concat(response.value);

if (response.oDataNextLink) {
return _retrieveAllRequest(request, response.oDataNextLink, records);
var pageLink = response.oDataNextLink;

if (pageLink) {
return _retrieveAllRequest(request, pageLink, records);
}

return { value: records };
var result = { value: records };

if (response.oDataDeltaLink) {
result["@odata.deltaLink"] = response.oDataDeltaLink;
result.oDataDeltaLink = response.oDataDeltaLink;
}

return result;
});
};

Expand Down
4 changes: 2 additions & 2 deletions dist/dynamics-web-api.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dynamics-web-api",
"version": "1.5.11",
"version": "1.5.12",
"description": "DynamicsWebApi is a Microsoft Dynamics CRM Web API helper library",
"keywords": [
"crm",
Expand Down

0 comments on commit 76b132d

Please sign in to comment.