Skip to content

Commit

Permalink
Merge pull request #1 from gobuffalo/fix/emit-error-nil-check
Browse files Browse the repository at this point in the history
Fix EmitError auto-convert to :err
  • Loading branch information
markbates committed Oct 13, 2018
2 parents 454ace1 + c5b0546 commit 4e9037c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion events.go
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 4e9037c

Please sign in to comment.