Skip to content

Commit

Permalink
fix #5 (#6)
Browse files Browse the repository at this point in the history
fix issue #5
  • Loading branch information
bestoak authored and sneljo1 committed Oct 28, 2018
1 parent 6763700 commit 74445b6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion query/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ func test(data interface{}, userQuery interface{}) (bool, error) {
if err != nil {
return false, err
}

if rule.GetName() != "$exists" && data == nil {
return false, nil
}
matched, err1 := rule.Match(data, v)

if err1 != nil {
Expand Down Expand Up @@ -198,6 +200,9 @@ func test(data interface{}, userQuery interface{}) (bool, error) {
last = last && result

}
if !last {
return false, nil
}
}

return last, nil
Expand Down

0 comments on commit 74445b6

Please sign in to comment.