Skip to content

Commit

Permalink
fix(useUrlFilterParams): reset preset w/o empty param, #804
Browse files Browse the repository at this point in the history
  • Loading branch information
awinogradov committed May 31, 2023
1 parent 0154ef6 commit d24463f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/hooks/useUrlFilterParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,11 @@ export const useUrlFilterParams = ({ preset }: { preset?: FilterById }) => {
(filter: string | undefined | null) => {
router.push({
pathname: router.asPath.split('?')[0],
query: {
filter,
},
query: filter
? {
filter,
}
: {},
});
},
[router],
Expand Down

0 comments on commit d24463f

Please sign in to comment.