This commit is contained in:
Sneha 2023-11-22 13:02:13 +05:30
parent 65ea6e8fd6
commit 682646f818

View file

@ -104,7 +104,7 @@ export default {
return this.PromoOnOrderText?.replaceAll( return this.PromoOnOrderText?.replaceAll(
"{custom:NEWPROMOCODE}", "{custom:NEWPROMOCODE}",
this.promoCode.toUpperCase() this.promoCode.toUpperCase()
).replaceAll("{custom:OLDPROMOCODE}", this.getPromoCode().toUpperCase()); ).replaceAll("{custom:OLDPROMOCODE}", this.getPromoCode()?.toUpperCase());
}, },
PromoText() { PromoText() {
return this.getCmsContent("AlertInvalidPromoWidget", "HeadlineText"); return this.getCmsContent("AlertInvalidPromoWidget", "HeadlineText");
@ -131,7 +131,7 @@ export default {
return promosToDisplay; return promosToDisplay;
}, },
getPromoCode() { getPromoCode() {
return this.lineItems.promos?.[0].promoCode; return this.lineItems.promos?.[0]?.promoCode;
}, },
onInputIdAssigned(inputId) { onInputIdAssigned(inputId) {
this.promoTextInputId = inputId; this.promoTextInputId = inputId;