gd-sprest 9.8.6 → 9.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/rest.js +1 -1
- package/build/utils/request.js +7 -11
- package/dist/gd-sprest.js +1 -1
- package/dist/gd-sprest.min.js +1 -1
- package/package.json +1 -1
package/build/rest.js
CHANGED
package/build/utils/request.js
CHANGED
|
@@ -436,7 +436,7 @@ export const Request = {
|
|
|
436
436
|
// Parse the requests
|
|
437
437
|
Executor(base.base.batchRequests, batchRequest => {
|
|
438
438
|
// Do nothing if the stop flag is set
|
|
439
|
-
if (root.stopFl) {
|
|
439
|
+
if (root.stopFl || base.stopFl) {
|
|
440
440
|
return;
|
|
441
441
|
}
|
|
442
442
|
// Return a promise
|
|
@@ -670,11 +670,9 @@ export const Request = {
|
|
|
670
670
|
if (isBatchRequest) {
|
|
671
671
|
// Process the callbacks
|
|
672
672
|
Batch.processCallbacks(base.base.batchRequests[batchIdx]);
|
|
673
|
-
// See if the callback for odata query exists
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
base.targetInfo.callbackQuery(base.base.batchRequests[batchIdx]);
|
|
677
|
-
}
|
|
673
|
+
// See if the callback for odata query exists and call the event
|
|
674
|
+
let callbackQuery = base.targetInfo.callbackQuery || base.base.targetInfo.callbackQuery;
|
|
675
|
+
callbackQuery ? callbackQuery(base.base.batchRequests[batchIdx]) : null;
|
|
678
676
|
}
|
|
679
677
|
}
|
|
680
678
|
},
|
|
@@ -700,16 +698,14 @@ export const Request = {
|
|
|
700
698
|
// Set the next item flag
|
|
701
699
|
base.nextFl = data["@odata.nextLink"] || (data.d && data.d.__next);
|
|
702
700
|
// See if the callback for odata query exists
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
base.targetInfo.callbackQuery(((_a = data.d) === null || _a === void 0 ? void 0 : _a.results) || data.value);
|
|
706
|
-
}
|
|
701
|
+
let callbackQuery = base.targetInfo.callbackQuery || base.base.targetInfo.callbackQuery;
|
|
702
|
+
callbackQuery ? callbackQuery(((_a = data.d) === null || _a === void 0 ? void 0 : _a.results) || data.value) : null;
|
|
707
703
|
// See if there are more items to get
|
|
708
704
|
if (base.nextFl) {
|
|
709
705
|
// Get the root base object
|
|
710
706
|
let root = Helper.getRootParent(base);
|
|
711
707
|
// See if we are getting all items in the base request
|
|
712
|
-
if (base.getAllItemsFl && root.stopFl != true) {
|
|
708
|
+
if (base.getAllItemsFl && (root.stopFl || base.stopFl) != true) {
|
|
713
709
|
// Create the target information to query the next set of results
|
|
714
710
|
let targetInfo = Object.create(base.targetInfo);
|
|
715
711
|
targetInfo.accessToken = base.targetInfo.accessToken || (base.xhr.isGraph ? Graph.Token : null);
|