Skip to content

Commit b6294d1

Browse files
committed
Correctly remove query parameters in compare page
If you set an empty value in the start/end inputs, the start/end URL parameters weren't removed previously. Therefore it was not possible to go back from a set start/end to an unset start/end.
1 parent 260098f commit b6294d1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

site/frontend/src/utils/navigation.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ export function createUrlWithAppendedParams(params: Dict<any>): URL {
1010
const stringified = value.toString();
1111
if (stringified !== "") {
1212
url.searchParams.set(key, stringified);
13+
} else {
14+
url.searchParams.delete(key);
1315
}
1416
}
1517
}

0 commit comments

Comments
 (0)