We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 295748a commit 65e831eCopy full SHA for 65e831e
1 file changed
apps/web/lib/getBooking.tsx
@@ -30,8 +30,9 @@ function getResponsesFromOldBooking(
30
return acc;
31
}, {});
32
return {
33
- name: rawBooking.attendees[0].name,
34
- email: rawBooking.attendees[0].email,
+ // It is possible to have no attendees in a booking when the booking is cancelled.
+ name: rawBooking.attendees[0]?.name || "Nameless",
35
+ email: rawBooking.attendees[0]?.email || "",
36
guests: rawBooking.attendees.slice(1).map((attendee) => {
37
return attendee.email;
38
}),
0 commit comments