From 682646f818518ddbaafb64a99035f4aef83520f0 Mon Sep 17 00:00:00 2001 From: Sneha Date: Wed, 22 Nov 2023 13:02:13 +0530 Subject: [PATCH] CSR-1829 --- .../promo-modal-question/promo-modal-question.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layouts/payment-method/promo-modal-question/promo-modal-question.vue b/src/layouts/payment-method/promo-modal-question/promo-modal-question.vue index b709e18f3..cde033066 100644 --- a/src/layouts/payment-method/promo-modal-question/promo-modal-question.vue +++ b/src/layouts/payment-method/promo-modal-question/promo-modal-question.vue @@ -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;