Nullcheck of rooms

This commit is contained in:
Niclas Edenvin
2025-05-06 14:17:39 +02:00
parent 2c03172e39
commit 09a4637556

View File

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