|
|
@ -572,8 +572,8 @@ function matchQueryPart (obj, queryKey, queryValue) { |
|
|
|
// or only normal fields. Mixed objects are not allowed
|
|
|
|
// or only normal fields. Mixed objects are not allowed
|
|
|
|
if (queryValue !== null && typeof queryValue === 'object') { |
|
|
|
if (queryValue !== null && typeof queryValue === 'object') { |
|
|
|
keys = Object.keys(queryValue); |
|
|
|
keys = Object.keys(queryValue); |
|
|
|
firstChars = _.map(keys, function (item) { return item[0]; }) |
|
|
|
firstChars = _.map(keys, function (item) { return item[0]; }); |
|
|
|
dollarFirstChars = _.filter(firstChars, function (c) { return c === '$'; }) |
|
|
|
dollarFirstChars = _.filter(firstChars, function (c) { return c === '$'; }); |
|
|
|
|
|
|
|
|
|
|
|
if (dollarFirstChars.length !== 0 && dollarFirstChars.length !== firstChars.length) { |
|
|
|
if (dollarFirstChars.length !== 0 && dollarFirstChars.length !== firstChars.length) { |
|
|
|
throw "You cannot mix operators and normal fields"; |
|
|
|
throw "You cannot mix operators and normal fields"; |
|
|
|