From 359c8204ce3edb13eeb84d1ad4118d78face5d2c Mon Sep 17 00:00:00 2001 From: hiteshkumar87 Date: Thu, 23 Nov 2023 19:18:15 +0530 Subject: [PATCH] Update payment.vue newValidatedPromos contains both validated and revalidated promos so can replace the existing promos in the lineitems. --- src/layouts/payment/payment.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layouts/payment/payment.vue b/src/layouts/payment/payment.vue index 95f427b8f..d86859668 100644 --- a/src/layouts/payment/payment.vue +++ b/src/layouts/payment/payment.vue @@ -350,8 +350,8 @@ export default { const taxedVaps = mapTaxedLineItemsToStoreFormat(taxedLineItems, availableVaps); // Add items that were not in the store yet but added via query string promo validation - lineItems.promos = lineItems.promos ?? []; - lineItems.promos.push(...newValidatedPromos); + //newValidatedPromos contains both validated and revalidated promos. + lineItems.promos = Array.from(newValidatedPromos); const vapsToAddToCart = getVapsThatNeedToBeAddedToSatisfyPromos( newValidatedPromos, taxedVaps,