Skip to content

Commit a12524a

Browse files
committed
bug fix, modify precedence.
1 parent f4c426d commit a12524a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/mongoosastic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ module.exports = function Mongoosastic(schema, options) {
552552
if (theVal) {
553553
final[path] = theVal;
554554
} else {
555-
if(origCondition.$or[0]) {
555+
if(origCondition.$or && origCondition.$or[0]) {
556556
theVal = origCondition.$or[0][path];
557557
if(theVal) {
558558
final[path] = theVal;

0 commit comments

Comments
 (0)