From 1607475b2126d6cd24311c81b9c069aefceb03cb Mon Sep 17 00:00:00 2001 From: Mohamed Marrouchi Date: Thu, 29 May 2025 07:33:01 +0100 Subject: [PATCH] fix: nit --- frontend/src/hooks/useUrlQueryParam.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/hooks/useUrlQueryParam.ts b/frontend/src/hooks/useUrlQueryParam.ts index 532995a8..abf46ca8 100644 --- a/frontend/src/hooks/useUrlQueryParam.ts +++ b/frontend/src/hooks/useUrlQueryParam.ts @@ -98,7 +98,11 @@ export const useUrlQueryParam = ( if (!router.isReady) return; const newQuery = { ...router.query }; - if (val === defaultValue || val === undefined || val === "") { + if ( + val === defaultValue || + val === undefined || + serializer.stringify(val) === "" + ) { delete newQuery[key]; } else { newQuery[key] = serializer.stringify(val);