Skip to content

Commit

Permalink
Prevening nil in next
Browse files Browse the repository at this point in the history
  • Loading branch information
nilathedragon committed Jan 11, 2019
1 parent 849dc64 commit 1a3b0b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subject.go
Expand Up @@ -76,7 +76,7 @@ func (subject Subject) notifySubscriber(subscription Subscription, values []inte
}

for i := 0; i < refFn.Type().NumIn(); i++ {
if refFn.Type().In(i).Kind() != reflect.ValueOf(values[i]).Type().Kind() {
if values[i] == nil || refFn.Type().In(i).Kind() != reflect.ValueOf(values[i]).Type().Kind() {
return
}
}
Expand Down

0 comments on commit 1a3b0b2

Please sign in to comment.