Nullcheck of rooms
This commit is contained in:
@@ -33,12 +33,12 @@ export function checkIsSameBooking(
|
|||||||
) {
|
) {
|
||||||
const { rooms: prevRooms, errorCode: prevErrorCode, ...prevBooking } = prev
|
const { rooms: prevRooms, errorCode: prevErrorCode, ...prevBooking } = prev
|
||||||
|
|
||||||
const prevRoomsWithoutRateCodes = prevRooms.map(
|
const prevRoomsWithoutRateCodes = prevRooms?.map(
|
||||||
({ rateCode, counterRateCode, roomTypeCode, ...room }) => room
|
({ rateCode, counterRateCode, roomTypeCode, ...room }) => room
|
||||||
)
|
)
|
||||||
const { rooms: nextRooms, errorCode: nextErrorCode, ...nextBooking } = next
|
const { rooms: nextRooms, errorCode: nextErrorCode, ...nextBooking } = next
|
||||||
|
|
||||||
const nextRoomsWithoutRateCodes = nextRooms.map(
|
const nextRoomsWithoutRateCodes = nextRooms?.map(
|
||||||
({ rateCode, counterRateCode, roomTypeCode, ...room }) => room
|
({ rateCode, counterRateCode, roomTypeCode, ...room }) => room
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user