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 CHANGED
@@ -6,7 +6,7 @@ import { GraphTypes, SPTypes } from "./sptypes";
6
6
  * SharePoint REST Library
7
7
  */
8
8
  export const $REST = {
9
- __ver: 9.86,
9
+ __ver: 9.88,
10
10
  AppContext: (siteUrl) => { return Lib.Site.getAppContext(siteUrl); },
11
11
  Apps: Lib.Apps,
12
12
  ContextInfo: Lib.ContextInfo,
@@ -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
- if (base.targetInfo.callbackQuery) {
675
- // Call the method
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
- if (base.targetInfo.callbackQuery) {
704
- // Call the method
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);