From e64b6860c1eb91eb38e43d10cce5d418e9e6203d Mon Sep 17 00:00:00 2001 From: Florent Vilmart Date: Thu, 3 Mar 2016 11:40:57 -0500 Subject: [PATCH] Allows to pass no where in $select clause - This is causing a bug for iOS SDK when no query constraints are set --- src/RestQuery.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RestQuery.js b/src/RestQuery.js index e68ec16f..5cd2df52 100644 --- a/src/RestQuery.js +++ b/src/RestQuery.js @@ -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');