fix(SW-3442) getLowestRoomPrice - cannot read property of undefined

* fix: getLowestRoomPrice throws when given unexpected data
* dont track lowestRoomPrice if unavailable


Approved-by: Hrishikesh Vaipurkar
This commit is contained in:
Joakim Jäderberg
2025-10-03 13:16:25 +00:00
parent 5bf18f0412
commit 9292c437f4
8 changed files with 312 additions and 49 deletions

View File

@@ -36,7 +36,7 @@ export function RoomsContainer({}: RoomsContainerProps) {
const lowestRoomPrice = getLowestRoomPrice()
const booking = inputData?.booking
if (!booking) return
if (!booking || !lowestRoomPrice) return
trackLowestRoomPrice({
hotelId: booking.hotelId,