Skip to content

Commit e64b686

Browse files
committed
Allows to pass no where in $select clause
- This is causing a bug for iOS SDK when no query constraints are set
1 parent 907a05c commit e64b686

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/RestQuery.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,11 +271,11 @@ RestQuery.prototype.replaceSelect = function() {
271271

272272
// The select value must have precisely two keys - query and key
273273
var selectValue = selectObject['$select'];
274+
// iOS SDK don't send where if not set, let it pass
274275
if (!selectValue.query ||
275276
!selectValue.key ||
276277
typeof selectValue.query !== 'object' ||
277278
!selectValue.query.className ||
278-
!selectValue.query.where ||
279279
Object.keys(selectValue).length !== 2) {
280280
throw new Parse.Error(Parse.Error.INVALID_QUERY,
281281
'improper usage of $select');

0 commit comments

Comments
 (0)