Skip to content

Commit

Permalink
nil guard
Browse files Browse the repository at this point in the history
  • Loading branch information
mmetc committed Sep 5, 2024
1 parent 22a30cd commit 97c9abd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/apiclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ func NewClient(config *Config) (*ApiClient, error) {
tlsconfig.Certificates = []tls.Certificate{*Cert}
}

t.Transport.(*http.Transport).TLSClientConfig = &tlsconfig
if t.Transport != nil {
t.Transport.(*http.Transport).TLSClientConfig = &tlsconfig
}

c := &ApiClient{client: t.Client(), BaseURL: baseURL, UserAgent: config.UserAgent, URLPrefix: config.VersionPrefix, PapiURL: config.PapiURL}
c.common.client = c
Expand Down

0 comments on commit 97c9abd

Please sign in to comment.