gd-sprest 9.6.5 → 9.6.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
@@ -9,7 +9,7 @@ var sptypes_1 = require("./sptypes");
9
9
  * SharePoint REST Library
10
10
  */
11
11
  exports.$REST = {
12
- __ver: 9.65,
12
+ __ver: 9.67,
13
13
  AppContext: function (siteUrl) { return Lib.Site.getAppContext(siteUrl); },
14
14
  Apps: Lib.Apps,
15
15
  ContextInfo: Lib.ContextInfo,
@@ -317,16 +317,16 @@ exports.Helper = {
317
317
  // Ensure the property exists
318
318
  var prop = result[key];
319
319
  if (prop) {
320
+ // See if this is a graph collection
321
+ if (typeof (prop === null || prop === void 0 ? void 0 : prop.length) === "number" && typeof (result[key + "@odata.navigationLinkUrl"]) === "string") {
322
+ // Set the results
323
+ prop.results = prop.splice(0, prop.length);
324
+ }
320
325
  // See if this is a collection
321
326
  if (prop["results"] && prop["results"].length > 0) {
322
327
  // Update the expanded collection
323
328
  exports.Helper.updateExpandedCollection(base, prop.results);
324
329
  }
325
- // Else, see if this is a graph collection
326
- else if (typeof (prop === null || prop === void 0 ? void 0 : prop.length) === "number" && typeof (result[key + "@odata.navigationLinkUrl"]) === "string") {
327
- // Update the expanded collection
328
- exports.Helper.updateExpandedCollection(base, prop);
329
- }
330
330
  // Else, see if this property was expanded
331
331
  else if (prop["__metadata"]) {
332
332
  // Add the base methods
@@ -186,6 +186,11 @@ exports.Request = {
186
186
  base[key] = value;
187
187
  break;
188
188
  }
189
+ // See if this is a graph collection
190
+ if (typeof (value === null || value === void 0 ? void 0 : value.length) === "number" && typeof (base[key + "@odata.navigationLinkUrl"]) === "string") {
191
+ // Set the results
192
+ base[key].results = base[key].splice(0, base[key].length);
193
+ }
189
194
  // See if the base is a collection
190
195
  if (base[key] && base[key].results) {
191
196
  // Ensure the collection is an object