@@ -1101,11 +1101,12 @@ class ParseQuery {
1101
1101
* @param {Number } maxDistance Maximum distance (in radians) of results to
1102
1102
* return.
1103
1103
* @param {Boolean } sorted A Bool value that is true if results should be
1104
- * sorted by distance ascending, false is no sorting is required.
1104
+ * sorted by distance ascending, false is no sorting is required,
1105
+ * defaults to true.
1105
1106
* @return {Parse.Query } Returns the query, so you can chain this call.
1106
1107
*/
1107
1108
withinRadians ( key : string , point : ParseGeoPoint , distance : number , sorted : boolean ) : ParseQuery {
1108
- if ( sorted ) {
1109
+ if ( sorted || sorted === undefined ) {
1109
1110
this . near ( key , point ) ;
1110
1111
return this . _addCondition ( key , '$maxDistance' , distance ) ;
1111
1112
} else {
@@ -1122,7 +1123,8 @@ class ParseQuery {
1122
1123
* @param {Number } maxDistance Maximum distance (in miles) of results to
1123
1124
* return.
1124
1125
* @param {Boolean } sorted A Bool value that is true if results should be
1125
- * sorted by distance ascending, false is no sorting is required.
1126
+ * sorted by distance ascending, false is no sorting is required,
1127
+ * defaults to true.
1126
1128
* @return {Parse.Query } Returns the query, so you can chain this call.
1127
1129
*/
1128
1130
withinMiles ( key : string , point : ParseGeoPoint , distance : number , sorted : boolean ) : ParseQuery {
@@ -1138,7 +1140,8 @@ class ParseQuery {
1138
1140
* @param {Number } maxDistance Maximum distance (in kilometers) of results
1139
1141
* to return.
1140
1142
* @param {Boolean } sorted A Bool value that is true if results should be
1141
- * sorted by distance ascending, false is no sorting is required.
1143
+ * sorted by distance ascending, false is no sorting is required,
1144
+ * defaults to true.
1142
1145
* @return {Parse.Query } Returns the query, so you can chain this call.
1143
1146
*/
1144
1147
withinKilometers ( key : string , point : ParseGeoPoint , distance : number , sorted : boolean ) : ParseQuery {
0 commit comments