Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
dplewis authored and acinader committed Jun 16, 2018
1 parent 00252cb commit 0e93306
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/ParseQuery.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3684,8 +3684,8 @@ describe('Parse.Query testing', () => {
});
});

it("includeAll", (done) => {
const child1 = new TestObject({ foo: 'bar', name: 'al' });
it('includeAll', (done) => {
const child1 = new TestObject({ foo: 'bar', name: 'ac' });
const child2 = new TestObject({ foo: 'baz', name: 'flo' });
const child3 = new TestObject({ foo: 'bad', name: 'mo' });
const parent = new Container({ child1, child2, child3 });
Expand All @@ -3702,7 +3702,7 @@ describe('Parse.Query testing', () => {
equal(result.child1.foo, 'bar');
equal(result.child2.foo, 'baz');
equal(result.child3.foo, 'bad');
equal(result.child1.name, 'al');
equal(result.child1.name, 'ac');
equal(result.child2.name, 'flo');
equal(result.child3.name, 'mo');
done();
Expand Down
2 changes: 2 additions & 0 deletions src/RestQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,7 @@ RestQuery.prototype.runCount = function() {
});
};

// Augments this.response with all pointers on an object
RestQuery.prototype.handleIncludeAll = function() {
if (!this.includeAll) {
return;
Expand All @@ -575,6 +576,7 @@ RestQuery.prototype.handleIncludeAll = function() {
}
// Add fields to include, keys, remove dups
this.include = [...new Set([...this.include, ...includeFields])];
// if this.keys not set, then all keys are already included
if (this.keys) {
this.keys = [...new Set([...this.keys, ...keyFields])];
}
Expand Down

0 comments on commit 0e93306

Please sign in to comment.