fix: don’t let the booking page crash on invalid metadata (#21410)
* fix: booking tab crash * Update zod-utils.ts * Update zod-utils.ts * update
This commit is contained in:
1 parent
3e8f0b125d
commit
f1dd217de7
2 files changed
+6
-2
No files matched your search
@@ -87,7 +87,9 @@ function buildParsedBooking(booking: BookingItemProps) {
|
||||
>)
|
||||
: null;
|
||||
|
||||
const bookingMetadata = bookingMetadataSchema.parse(booking.metadata ?? null);
|
||||
const parsedMetadata = bookingMetadataSchema.safeParse(booking.metadata ?? null);
|
||||
const bookingMetadata = parsedMetadata.success ? parsedMetadata.data : null;
|
||||
|
||||
return {
|
||||
...booking,
|
||||
eventType: bookingEventType,
|
||||
|
||||
Reference in new issue
Block a user