Skip to content

Commit

Permalink
fixes role filter not being cleared when reset state achieved
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed Nov 30, 2024
1 parent 675f2e5 commit 3ea55bc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/leaderboard/[duration]/Leaderboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ export default function Leaderboard(props: Props) {
) => {
const params = new URLSearchParams(searchParams.toString());
if (Array.isArray(value)) {
params.set(key, value.join(","));
if (value.length) {
params.set(key, value.join(","));
} else {
params.delete(key);
}
} else {
params.set(key, value.toString());
}
Expand Down

0 comments on commit 3ea55bc

Please sign in to comment.