Allows to pass no where in $select clause

- This is causing a bug for iOS SDK when no query constraints are set
This commit is contained in:
Florent Vilmart
2016-03-03 11:40:57 -05:00
parent 907a05c57a
commit e64b6860c1

View File

@@ -271,11 +271,11 @@ RestQuery.prototype.replaceSelect = function() {
// The select value must have precisely two keys - query and key
var selectValue = selectObject['$select'];
// iOS SDK don't send where if not set, let it pass
if (!selectValue.query ||
!selectValue.key ||
typeof selectValue.query !== 'object' ||
!selectValue.query.className ||
!selectValue.query.where ||
Object.keys(selectValue).length !== 2) {
throw new Parse.Error(Parse.Error.INVALID_QUERY,
'improper usage of $select');