CASH-1637
CASH-1637 check for array to prevent exception when not
This commit is contained in:
parent
85cad5a6ce
commit
58e2ec0add
1 changed files with 6 additions and 4 deletions
|
|
@ -237,10 +237,12 @@ export default {
|
||||||
(lineItem) => lineItem.partType == partTypeStrings.EARLY_BIRD
|
(lineItem) => lineItem.partType == partTypeStrings.EARLY_BIRD
|
||||||
);
|
);
|
||||||
|
|
||||||
const promoCodes = order?.lineItems?.promos
|
const promoCodes = Array.isArray(order?.lineItems?.promos)
|
||||||
?.map((item) => item.promoCode)
|
? order?.lineItems?.promos
|
||||||
.filter((code) => code)
|
?.map((item) => item.promoCode)
|
||||||
.join(", ");
|
.filter((code) => code)
|
||||||
|
.join(", ")
|
||||||
|
: "";
|
||||||
|
|
||||||
label = {};
|
label = {};
|
||||||
label.serviceType = order?.serviceLocation?.appointmentType;
|
label.serviceType = order?.serviceLocation?.appointmentType;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue