mirror of
https://github.com/adnanh/webhook.git
synced 2025-05-20 20:40:09 +00:00
possible null exception fix
This commit is contained in:
parent
363a5359bd
commit
be543f4005
1 changed files with 1 additions and 1 deletions
|
@ -126,7 +126,7 @@ func New(hookFile string) (*Hooks, error) {
|
||||||
func (h *Hooks) Match(id string, params interface{}) *Hook {
|
func (h *Hooks) Match(id string, params interface{}) *Hook {
|
||||||
for i := range h.list {
|
for i := range h.list {
|
||||||
if h.list[i].ID == id {
|
if h.list[i].ID == id {
|
||||||
if h.list[i].Rule.Evaluate(params) {
|
if h.list[i].Rule != nil && h.list[i].Rule.Evaluate(params) {
|
||||||
return &h.list[i]
|
return &h.list[i]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue