Do not require where clause in condition on queries.

This commit is contained in:
Nikita Lutsenko
2016-03-08 17:08:07 -08:00
parent 3723b9bb75
commit e93873f7b1
2 changed files with 36 additions and 12 deletions

View File

@@ -324,12 +324,10 @@ RestQuery.prototype.replaceDontSelect = function() {
!dontSelectValue.key ||
typeof dontSelectValue.query !== 'object' ||
!dontSelectValue.query.className ||
!dontSelectValue.query.where ||
Object.keys(dontSelectValue).length !== 2) {
throw new Parse.Error(Parse.Error.INVALID_QUERY,
'improper usage of $dontSelect');
}
var subquery = new RestQuery(
this.config, this.auth, dontSelectValue.query.className,
dontSelectValue.query.where);