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 +1 -1
- package/build/utils/helper.js +5 -5
- package/build/utils/request.js +5 -0
- 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/helper.js
CHANGED
|
@@ -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
|
package/build/utils/request.js
CHANGED
|
@@ -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
|