Skip to content

Commit

Permalink
Fix EmitError auto-convert to :err
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislas-m committed Oct 13, 2018
1 parent 454ace1 commit c5b0546
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion events.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func EmitPayload(kind string, payload interface{}) error {
}

func EmitError(kind string, err error, payload interface{}) error {
if !strings.HasSuffix(kind, ":err") {
if err != nil && !strings.HasSuffix(kind, ":err") {
kind += ":err"
}
var pl Payload
Expand Down

0 comments on commit c5b0546

Please sign in to comment.