diff --git a/apps/scandic-web/components/HotelReservation/SelectHotel/HotelFilter/index.tsx b/apps/scandic-web/components/HotelReservation/SelectHotel/HotelFilter/index.tsx index 6c072035d..10420b0dd 100644 --- a/apps/scandic-web/components/HotelReservation/SelectHotel/HotelFilter/index.tsx +++ b/apps/scandic-web/components/HotelReservation/SelectHotel/HotelFilter/index.tsx @@ -61,11 +61,13 @@ export default function HotelFilter({ className, filters }: HotelFiltersProps) { if (values === "") { newSearchParams.delete("filters") } else { - trackFiltersEvent() newSearchParams.set("filters", values) } - if (values !== searchParams.values.toString()) { + if (values !== searchParams.get("filters")) { + if (values) { + trackFiltersEvent() + } window.history.replaceState( null, "",