diff --git a/apps/scandic-web/stores/enter-details/helpers.ts b/apps/scandic-web/stores/enter-details/helpers.ts index 525147b08..42fd0c769 100644 --- a/apps/scandic-web/stores/enter-details/helpers.ts +++ b/apps/scandic-web/stores/enter-details/helpers.ts @@ -33,12 +33,12 @@ export function checkIsSameBooking( ) { const { rooms: prevRooms, errorCode: prevErrorCode, ...prevBooking } = prev - const prevRoomsWithoutRateCodes = prevRooms.map( + const prevRoomsWithoutRateCodes = prevRooms?.map( ({ rateCode, counterRateCode, roomTypeCode, ...room }) => room ) const { rooms: nextRooms, errorCode: nextErrorCode, ...nextBooking } = next - const nextRoomsWithoutRateCodes = nextRooms.map( + const nextRoomsWithoutRateCodes = nextRooms?.map( ({ rateCode, counterRateCode, roomTypeCode, ...room }) => room )