Skip to content

Commit

Permalink
bug fix, modify precedence.
Browse files Browse the repository at this point in the history
  • Loading branch information
wanghao1891 committed May 12, 2016
1 parent f4c426d commit a12524a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mongoosastic.js
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ module.exports = function Mongoosastic(schema, options) {
if (theVal) {
final[path] = theVal;
} else {
if(origCondition.$or[0]) {
if(origCondition.$or && origCondition.$or[0]) {
theVal = origCondition.$or[0][path];
if(theVal) {
final[path] = theVal;
Expand Down

0 comments on commit a12524a

Please sign in to comment.