diff --git a/src/fmg-components/cart/cart.vue b/src/fmg-components/cart/cart.vue index 8a7714410..6f82cee6b 100644 --- a/src/fmg-components/cart/cart.vue +++ b/src/fmg-components/cart/cart.vue @@ -103,7 +103,6 @@ ref="promoModalQuestion" class="small mt-4" v-model="lineItems" - emitToGrandparent="true" :availableVaps="availableVaps" modalWidgetName="PromoModalWidget" /> @@ -158,7 +157,6 @@ export default { style: "currency", currency: "USD", }), - lineItems: deepClone(this.modelValue), }; }, methods: { @@ -236,8 +234,6 @@ export default { this.lineItems[category] = this.lineItems[category].filter( (lineItemsToKeep) => lineItemsToKeep.cartItemType != cartItemType ); - - this.$emit("update:modelValue", this.lineItems); }, getPromoCodeList() { if (this.$refs["promoModalQuestion"]) { @@ -247,6 +243,14 @@ export default { }, }, computed: { + lineItems: { + get: function () { + return this.modelValue; + }, + set: function (newValue) { + this.$emit("update:modelValue", newValue); + }, + }, screenReaderTotalAmountDueText() { return this.getCmsContent("ScreenReaderTotalAmountDueWidget", "Text"); }, @@ -839,14 +843,6 @@ export default { return this.subTotal + this.salesTax; }, }, - watch: { - modelValue: { - handler(newValue) { - this.lineItems = deepClone(newValue); - }, - deep: true, - }, - }, components: { textBlock, textLink, diff --git a/src/fmg-components/promo-modal-question/promo-modal-question.vue b/src/fmg-components/promo-modal-question/promo-modal-question.vue index 56d235afc..e0b1a8884 100644 --- a/src/fmg-components/promo-modal-question/promo-modal-question.vue +++ b/src/fmg-components/promo-modal-question/promo-modal-question.vue @@ -106,11 +106,6 @@ export default { required: false, default: true, }, - emitToGrandparent: { - type: Boolean, - required: false, - default: false, - }, }, computed: { promoLinkText() { @@ -180,7 +175,6 @@ export default { }, onModalClosed() { this.resetAlerts(); - if (this.emitToGrandparent) this.$parent.$emit("update:modelValue", this.lineItems); this.$emit("update:modelValue", this.lineItems); this.promoCode = ""; this.modal.resetForm();