Skip to content

Commit 2d21c2a

Browse files
authored
fix(search): support query all classes (#629)
1 parent fe14da0 commit 2d21c2a

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/search.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,17 @@ module.exports = function(AV) {
118118
_queryString: null,
119119
_highlights: null,
120120
_sortBuilder: null,
121+
_clazz: null,
122+
123+
constructor: function(className) {
124+
if (className) {
125+
this._clazz = className;
126+
} else {
127+
className = '__INVALID_CLASS';
128+
}
129+
AV.Query.call(this, className);
130+
},
131+
121132
_createRequest: function(params, options) {
122133
return AVRequest(
123134
'search/select',
@@ -260,7 +271,7 @@ module.exports = function(AV) {
260271
_getParams: function() {
261272
var params = AV.SearchQuery.__super__._getParams.call(this);
262273
delete params.where;
263-
if (this.className) {
274+
if (this._clazz) {
264275
params.clazz = this.className;
265276
}
266277
if (this._sid) {

0 commit comments

Comments
 (0)