Skip to content

Commit b06bf76

Browse files
authored
Add suggestions
1 parent 91b5592 commit b06bf76

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/RestQuery.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,16 @@ function RestQuery(
6868
// For example, passing an arg of include=foo.bar,foo.baz could lead to
6969
// this.include = [['foo'], ['foo', 'baz'], ['foo', 'bar']]
7070
this.include = [];
71-
var keysForInclude = [];
71+
let keysForInclude = '';
7272

7373
// If we have keys, we probably want to force some includes (n-1 level)
7474
// See issue: https://github.com/parse-community/parse-server/issues/3185
7575
if (Object.prototype.hasOwnProperty.call(restOptions, 'keys')) {
7676
keysForInclude = restOptions.keys;
7777
}
7878

79+
// If we have keys, we probably want to force some includes (n-1 level)
80+
// in order to exclude specific keys.
7981
if (Object.prototype.hasOwnProperty.call(restOptions, 'excludeKeys')) {
8082
keysForInclude += ',' + restOptions.excludeKeys;
8183
}

0 commit comments

Comments
 (0)