Skip to content

Commit 3dbe62f

Browse files
committed
Adding nil check on url Params
1 parent 42f6bec commit 3dbe62f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

url/url.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ func (u *URL) Update() {
5252
// This is a hot patch for url.URL
5353
// parameters are serialized when parsed with `url.Parse()` to avoid this
5454
// url should be parsed without parameters and then assigned with url.RawQuery to force unserialized parameters
55-
u.RawQuery = u.Params.Encode()
55+
if u.Params != nil {
56+
u.RawQuery = u.Params.Encode()
57+
}
5658
}
5759

5860
// Query returns Query Params

0 commit comments

Comments
 (0)