Skip to content

Commit

Permalink
Merge pull request #14817 from artsy/olerichter00/ONYX-699/remove-fil…
Browse files Browse the repository at this point in the history
…ters-set-to-null-from-the-url

fix: Remove filters with `null` values from the URL
  • Loading branch information
damassi authored Nov 8, 2024
2 parents b024101 + ab7cbc5 commit 969b6a9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Components/ArtworkFilter/Utils/urlBuilder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ export const buildUrl = (
const params = removeDefaultValues(state, {
defaultValues: options?.defaultValues,
})
const queryString = qs.stringify(paramsToSnakeCase(params))
const queryString = qs.stringify(paramsToSnakeCase(params), {
skipNulls: true,
})

let pathname = options?.pathname
if (!pathname && typeof window !== "undefined") {
Expand Down

0 comments on commit 969b6a9

Please sign in to comment.