gd-sprest 9.8.5 → 9.8.7

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.85,
9
+ __ver: 9.87,
10
10
  AppContext: (siteUrl) => { return Lib.Site.getAppContext(siteUrl); },
11
11
  Apps: Lib.Apps,
12
12
  ContextInfo: Lib.ContextInfo,
@@ -670,6 +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 and call the event
674
+ let callbackQuery = base.targetInfo.callbackQuery || base.base.targetInfo.callbackQuery;
675
+ callbackQuery ? callbackQuery(base.base.batchRequests[batchIdx]) : null;
673
676
  }
674
677
  }
675
678
  },
@@ -695,10 +698,8 @@ export const Request = {
695
698
  // Set the next item flag
696
699
  base.nextFl = data["@odata.nextLink"] || (data.d && data.d.__next);
697
700
  // See if the callback for odata query exists
698
- if (base.targetInfo.callbackQuery) {
699
- // Call the method
700
- base.targetInfo.callbackQuery(((_a = data.d) === null || _a === void 0 ? void 0 : _a.results) || data.value);
701
- }
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;
702
703
  // See if there are more items to get
703
704
  if (base.nextFl) {
704
705
  // Get the root base object