fix: handle undefined values schemas

This commit is contained in:
Christel Westerberg
2025-01-02 10:55:32 +01:00
parent 139accb8ed
commit 1f516c7c20
3 changed files with 14 additions and 12 deletions

View File

@@ -150,13 +150,13 @@ export default function RoomCard({
</div>
<div className={styles.specification}>
{occupancy && (
{occupancy?.total && (
<Caption color="uiTextMediumContrast" className={styles.guests}>
{intl.formatMessage(
{
id: "booking.guests",
},
{ nrOfGuests: occupancy?.total }
{ nrOfGuests: occupancy.total }
)}
</Caption>
)}