Skip to content

Commit

Permalink
Adding nil check on url Params
Browse files Browse the repository at this point in the history
  • Loading branch information
Mzack9999 committed Mar 23, 2023
1 parent 42f6bec commit 3dbe62f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion url/url.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ func (u *URL) Update() {
// This is a hot patch for url.URL
// parameters are serialized when parsed with `url.Parse()` to avoid this
// url should be parsed without parameters and then assigned with url.RawQuery to force unserialized parameters
u.RawQuery = u.Params.Encode()
if u.Params != nil {
u.RawQuery = u.Params.Encode()
}
}

// Query returns Query Params
Expand Down

0 comments on commit 3dbe62f

Please sign in to comment.