refactor: Align new code from #259 with existing code

This commit is contained in:
TwiN
2022-03-09 21:05:57 -05:00
parent c4255e65bc
commit 8970ad5ad5
2 changed files with 9 additions and 11 deletions

View File

@ -111,8 +111,7 @@ func (endpoint *Endpoint) ValidateAndSetDefaults() error {
if endpoint.ClientConfig == nil {
endpoint.ClientConfig = client.GetDefaultConfig()
} else {
err := endpoint.ClientConfig.ValidateAndSetDefaults()
if err != nil {
if err := endpoint.ClientConfig.ValidateAndSetDefaults(); err != nil {
return err
}
}