From a3fd54636ef860cf5443e0db9fa479ffe12ce576 Mon Sep 17 00:00:00 2001 From: Pontus Dreij Date: Tue, 17 Dec 2024 16:41:38 +0100 Subject: [PATCH] fix(SW-952): check for valid hotels --- components/HotelReservation/SelectHotel/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/HotelReservation/SelectHotel/index.tsx b/components/HotelReservation/SelectHotel/index.tsx index 861d2a9ef..376a4e31e 100644 --- a/components/HotelReservation/SelectHotel/index.tsx +++ b/components/HotelReservation/SelectHotel/index.tsx @@ -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 (