From c8937d121f88c0244730a2a0e83736ae5c2d901d Mon Sep 17 00:00:00 2001 From: Pontus Dreij Date: Fri, 15 Nov 2024 14:37:08 +0100 Subject: [PATCH] fix(SW-839): Fallback if member is not available --- .../SelectRate/RoomSelection/RateSummary/index.tsx | 2 +- types/components/hotelReservation/selectRate/selectRate.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/HotelReservation/SelectRate/RoomSelection/RateSummary/index.tsx b/components/HotelReservation/SelectRate/RoomSelection/RateSummary/index.tsx index 33400efaf..e23299e0d 100644 --- a/components/HotelReservation/SelectRate/RoomSelection/RateSummary/index.tsx +++ b/components/HotelReservation/SelectRate/RoomSelection/RateSummary/index.tsx @@ -35,7 +35,7 @@ export default function RateSummary({ roomType, priceName, } = rateSummary - const priceToShow = isUserLoggedIn ? member : publicRate + const priceToShow = isUserLoggedIn && member ? member : publicRate const isPetRoomSelected = features.some( (feature) => feature.code === RoomPackageCodeEnum.PET_ROOM diff --git a/types/components/hotelReservation/selectRate/selectRate.ts b/types/components/hotelReservation/selectRate/selectRate.ts index ba8f3f45c..a1da31b84 100644 --- a/types/components/hotelReservation/selectRate/selectRate.ts +++ b/types/components/hotelReservation/selectRate/selectRate.ts @@ -29,6 +29,6 @@ export interface Rate { roomTypeCode: RoomConfiguration["roomTypeCode"] priceName: string public: Product["productType"]["public"] - member: Product["productType"]["member"] + member?: Product["productType"]["member"] features: RoomConfiguration["features"] }