fix: eventName variables (#10924)
parent
95be16c358
commit
f326a9a620
|
@ -57,8 +57,12 @@ export function getEventName(eventNameObj: EventNameObjectType, forAttendeeView
|
||||||
if (variable === bookingField) {
|
if (variable === bookingField) {
|
||||||
let fieldValue;
|
let fieldValue;
|
||||||
if (eventNameObj.bookingFields) {
|
if (eventNameObj.bookingFields) {
|
||||||
fieldValue =
|
const field = eventNameObj.bookingFields[bookingField as keyof typeof eventNameObj.bookingFields];
|
||||||
eventNameObj.bookingFields[bookingField as keyof typeof eventNameObj.bookingFields]?.toString();
|
if (field && typeof field === "object" && "value" in field) {
|
||||||
|
fieldValue = field?.value?.toString();
|
||||||
|
} else {
|
||||||
|
fieldValue = field?.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
dynamicEventName = dynamicEventName.replace(`{${variable}}`, fieldValue || "");
|
dynamicEventName = dynamicEventName.replace(`{${variable}}`, fieldValue || "");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue