diff --git a/src/RestQuery.js b/src/RestQuery.js index 4452a86c22..a519b09305 100644 --- a/src/RestQuery.js +++ b/src/RestQuery.js @@ -866,7 +866,7 @@ function includePath(config, auth, response, path, restOptions = {}) { return set; } } - if (i == keyPath.length - 1) { + if (i + 1 === keyPath.length) { set.add(keyPath[i]); } return set;