Skip to content

Commit 3924731

Browse files
authored
fix: undefined reason (#7745)
1 parent 74986bb commit 3924731

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/features/bookings/lib/handleNewBooking.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,7 @@ async function handler(
10521052
await sendRescheduledEmails({
10531053
...copyEvent,
10541054
additionalNotes, // Resets back to the additionalNote input and not the override value
1055-
cancellationReason: "$RCH$" + rescheduleReason, // Removable code prefix to differentiate cancellation from rescheduling for email
1055+
cancellationReason: "$RCH$" + rescheduleReason ? rescheduleReason : "", // Removable code prefix to differentiate cancellation from rescheduling for email
10561056
});
10571057
}
10581058
const resultBooking = await resultBookingQuery(newBooking.id);
@@ -1157,7 +1157,7 @@ async function handler(
11571157
await sendRescheduledEmails({
11581158
...copyEvent,
11591159
additionalNotes, // Resets back to the additionalNote input and not the override value
1160-
cancellationReason: "$RCH$" + rescheduleReason, // Removable code prefix to differentiate cancellation from rescheduling for email
1160+
cancellationReason: "$RCH$" + rescheduleReason ? rescheduleReason : "", // Removable code prefix to differentiate cancellation from rescheduling for email
11611161
});
11621162

11631163
// Delete the old booking
@@ -1678,7 +1678,7 @@ async function handler(
16781678
...copyEvent,
16791679
additionalInformation: metadata,
16801680
additionalNotes, // Resets back to the additionalNote input and not the override value
1681-
cancellationReason: "$RCH$" + rescheduleReason, // Removable code prefix to differentiate cancellation from rescheduling for email
1681+
cancellationReason: "$RCH$" + rescheduleReason ? rescheduleReason : "", // Removable code prefix to differentiate cancellation from rescheduling for email
16821682
});
16831683
}
16841684
}

0 commit comments

Comments
 (0)