Skip to content

Commit

Permalink
Ignore not specified url optional query params
Browse files Browse the repository at this point in the history
  • Loading branch information
nvborisenko committed Oct 15, 2024
1 parent b05722f commit b5b5b88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Yapoml.Playwright/Services/NavigationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public Uri BuildUri(string url, IList<KeyValuePair<string, string>> segments, IL

if (queryParams != null && queryParams.Count > 0)
{
urlBuilder.Query = string.Join("&", queryParams.Select(qp => $"{qp.Key}={qp.Value}"));
urlBuilder.Query = string.Join("&", queryParams.Where(qp => qp.Value is not null).Select(qp => $"{qp.Key}={qp.Value}"));
}

return urlBuilder.Uri;
Expand Down

0 comments on commit b5b5b88

Please sign in to comment.