Merge pull request #1563 from Safelite/feature/CSR-1829

CSR-1829
This commit is contained in:
AMSNEHA 2023-11-22 15:40:09 +05:30 committed by GitHub
commit 4be89c2709
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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