CASH-1637

CASH-1637 check for array to prevent exception when not
This commit is contained in:
CarlNation 2025-10-07 15:06:41 -04:00
parent 85cad5a6ce
commit 58e2ec0add

View file

@ -237,10 +237,12 @@ export default {
(lineItem) => lineItem.partType == partTypeStrings.EARLY_BIRD
);
const promoCodes = order?.lineItems?.promos
?.map((item) => item.promoCode)
.filter((code) => code)
.join(", ");
const promoCodes = Array.isArray(order?.lineItems?.promos)
? order?.lineItems?.promos
?.map((item) => item.promoCode)
.filter((code) => code)
.join(", ")
: "";
label = {};
label.serviceType = order?.serviceLocation?.appointmentType;