Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f00069c

Browse files
author
gtwn
committedMar 21, 2025·
fix: handle nil credentials before clone
1 parent e158f04 commit f00069c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎client.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -2193,7 +2193,11 @@ func (c *Client) Clone(ctx context.Context) *Client {
21932193
cc.formData = cloneURLValues(c.formData)
21942194
cc.header = c.header.Clone()
21952195
cc.pathParams = maps.Clone(c.pathParams)
2196-
cc.credentials = c.credentials.Clone()
2196+
2197+
if c.credentials != nil {
2198+
cc.credentials = c.credentials.Clone()
2199+
}
2200+
21972201
cc.contentTypeEncoders = maps.Clone(c.contentTypeEncoders)
21982202
cc.contentTypeDecoders = maps.Clone(c.contentTypeDecoders)
21992203
cc.contentDecompressers = maps.Clone(c.contentDecompressers)

0 commit comments

Comments
 (0)
Please sign in to comment.