From 39247312665bf70613983e56bb374e81f3145942 Mon Sep 17 00:00:00 2001 From: Nafees Nazik <84864519+G3root@users.noreply.github.com> Date: Thu, 16 Mar 2023 01:37:14 +0530 Subject: [PATCH] fix: undefined reason (#7745) --- packages/features/bookings/lib/handleNewBooking.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/features/bookings/lib/handleNewBooking.ts b/packages/features/bookings/lib/handleNewBooking.ts index d6bbe78a5e..7f6afb3f0b 100644 --- a/packages/features/bookings/lib/handleNewBooking.ts +++ b/packages/features/bookings/lib/handleNewBooking.ts @@ -1052,7 +1052,7 @@ async function handler( await sendRescheduledEmails({ ...copyEvent, additionalNotes, // Resets back to the additionalNote input and not the override value - cancellationReason: "$RCH$" + rescheduleReason, // Removable code prefix to differentiate cancellation from rescheduling for email + cancellationReason: "$RCH$" + rescheduleReason ? rescheduleReason : "", // Removable code prefix to differentiate cancellation from rescheduling for email }); } const resultBooking = await resultBookingQuery(newBooking.id); @@ -1157,7 +1157,7 @@ async function handler( await sendRescheduledEmails({ ...copyEvent, additionalNotes, // Resets back to the additionalNote input and not the override value - cancellationReason: "$RCH$" + rescheduleReason, // Removable code prefix to differentiate cancellation from rescheduling for email + cancellationReason: "$RCH$" + rescheduleReason ? rescheduleReason : "", // Removable code prefix to differentiate cancellation from rescheduling for email }); // Delete the old booking @@ -1678,7 +1678,7 @@ async function handler( ...copyEvent, additionalInformation: metadata, additionalNotes, // Resets back to the additionalNote input and not the override value - cancellationReason: "$RCH$" + rescheduleReason, // Removable code prefix to differentiate cancellation from rescheduling for email + cancellationReason: "$RCH$" + rescheduleReason ? rescheduleReason : "", // Removable code prefix to differentiate cancellation from rescheduling for email }); } }