Skip to content

Commit

Permalink
Fix non clean url with prerogatives
Browse files Browse the repository at this point in the history
  • Loading branch information
garronej committed Apr 10, 2023
1 parent 0faa30d commit 391c7c0
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/ui/pages/softwareCatalog/SoftwareCatalog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,8 @@ export default function SoftwareCatalog(props: Props) {
//TODO: Submit an issue to type-route, it should test the shallow equality of the params
const updateRouteParams = useConstCallback(
(params: Param0<(typeof routes)["softwareCatalog"]>) => {
if (
params.prerogatives?.length === 0 &&
route.params.prerogatives.length === 0
) {
delete params.prerogatives;
if (params.prerogatives?.length === 0) {
params.prerogatives = undefined;
}

return routes.softwareCatalog(params);
Expand Down

0 comments on commit 391c7c0

Please sign in to comment.