Skip to content

Commit

Permalink
fix #74
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengchun committed May 21, 2022
1 parent 7a0d04a commit 2afacf4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions query.go
Original file line number Diff line number Diff line change
Expand Up @@ -820,13 +820,17 @@ func (b *booleanQuery) Select(t iterator) NodeNavigator {
}

func (b *booleanQuery) Evaluate(t iterator) interface{} {
n := t.Current().Copy()

m := b.Left.Evaluate(t)
left := asBool(t, m)
if b.IsOr && left {
return true
} else if !b.IsOr && !left {
return false
}

t.Current().MoveTo(n)
m = b.Right.Evaluate(t)
return asBool(t, m)
}
Expand Down

0 comments on commit 2afacf4

Please sign in to comment.