From 9ff976cde1e2f67e8c406505e2a0580f0669ada4 Mon Sep 17 00:00:00 2001 From: Bianca Widstam Date: Fri, 24 Jan 2025 10:03:27 +0000 Subject: [PATCH] Merged in fix/hotelData-is-null (pull request #1209) fix: filter hotels that has valid hotelData * fix: filter hotels that has valid hotelData Approved-by: Pontus Dreij --- components/HotelReservation/SelectHotel/index.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/HotelReservation/SelectHotel/index.tsx b/components/HotelReservation/SelectHotel/index.tsx index 566f554d9..3f16d3353 100644 --- a/components/HotelReservation/SelectHotel/index.tsx +++ b/components/HotelReservation/SelectHotel/index.tsx @@ -71,10 +71,9 @@ export default async function SelectHotel({ const isCityWithCountry = (city: any): city is { country: string } => "country" in city - const validHotels = - hotels?.filter((hotel): hotel is HotelData => hotel !== null) || [] - + hotels?.filter((hotel): hotel is HotelData => hotel?.hotelData !== null) || + [] const filterList = getFiltersFromHotels(validHotels) const searchParams = convertObjToSearchParams(selectHotelParams)