Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions src/RestQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -1066,11 +1066,7 @@ function includePath(config, auth, response, path, restOptions = {}) {
// Returns a list of pointers in REST format.
function findPointers(object, path) {
if (object instanceof Array) {
var answer = [];
for (var x of object) {
answer = answer.concat(findPointers(x, path));
}
return answer;
return object.map(x => findPointers(x, path)).flat();
}

if (typeof object !== 'object' || !object) {
Expand Down