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
This commit is contained in:
Bianca Widstam
2025-01-24 10:03:27 +00:00
parent 879a2e9cfd
commit 9ff976cde1

View File

@@ -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)