Skip to content

Commit

Permalink
Merge pull request adnanh#16 from moorereason/fix-notrule
Browse files Browse the repository at this point in the history
Fix infinite loop in NotRule.Evaluate
  • Loading branch information
adnanh committed Mar 20, 2015
2 parents b8807ed + becd893 commit bddb523
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hook/hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ type NotRule Rules

// Evaluate NotRule will return true if and only if ChildRule evaluates to false
func (r NotRule) Evaluate(headers, query, payload *map[string]interface{}, body *[]byte) bool {
return !r.Evaluate(headers, query, payload, body)
return !Rules(r).Evaluate(headers, query, payload, body)
}

// MatchRule will evaluate to true based on the type
Expand Down

0 comments on commit bddb523

Please sign in to comment.