diff --git a/src/fmg-components/add-vaps-modal-buttons/add-vaps-modal-buttons.vue b/src/fmg-components/add-vaps-modal-buttons/add-vaps-modal-buttons.vue index edfac624e..09c7dcdb4 100644 --- a/src/fmg-components/add-vaps-modal-buttons/add-vaps-modal-buttons.vue +++ b/src/fmg-components/add-vaps-modal-buttons/add-vaps-modal-buttons.vue @@ -42,17 +42,15 @@ export default { isDisplayed() { return this.showAddRainDefense || this.showAddWipers; }, - showAddRainDefense() { - const rainDefenseIndex = this.cart.findIndex((vap) => { + showAddRainDefense() { // if it's not found in the cart + return !this.cart.some((vap) => { return vap.partType === "RAIN DEFENSE"; }); - return rainDefenseIndex > -1 ? false : true; }, - showAddWipers() { - const rainDefenseIndex = this.cart.findIndex((vap) => { + showAddWipers() { // if it's not found in the cart + return !this.cart.some((vap) => { return vap.partType.includes(" WIPER"); }); - return rainDefenseIndex > -1 ? false : true; }, rainDefensePrice() { const lineItem = this.rainDefenseItem;