fix(SW-952): check for valid hotels

This commit is contained in:
Pontus Dreij
2024-12-17 16:41:38 +01:00
parent 7fc68d3a0b
commit a3fd54636e

View File

@@ -126,8 +126,8 @@ export default async function SelectHotel({
leadTime: differenceInCalendarDays(arrivalDate, new Date()),
searchType: "destination",
bookingTypeofDay: isWeekend(arrivalDate) ? "weekend" : "weekday",
country: validHotels?.[0].hotelData.address.country,
region: validHotels?.[0].hotelData.address.city,
country: validHotels?.[0]?.hotelData.address.country,
region: validHotels?.[0]?.hotelData.address.city,
}
return (