Skip to content

Commit

Permalink
Fix panic when returning a nil ValidationError
Browse files Browse the repository at this point in the history
  • Loading branch information
ppacher committed May 23, 2023
1 parent 3ae6368 commit 63f7a96
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion config/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,11 @@ func Register(option *Option) error {
}

// return the validation-error from loadUnmappedValue here
return vErr
if vErr != nil {
return vErr
}

return nil
}

func loadUnmappedValue(option *Option) (bool, *ValidationError) {
Expand Down

0 comments on commit 63f7a96

Please sign in to comment.