From 855e3acc9d868023a9de58f072d68707e961885f Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Wed, 1 Jun 2022 08:26:30 -0400 Subject: [PATCH] CSR-347: return out of forwardButtonAction if no lookupVin found / remove unused var --- src/layouts/address-vehicles/address-vehicles.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/layouts/address-vehicles/address-vehicles.vue b/src/layouts/address-vehicles/address-vehicles.vue index 34937bfb7..dc2e53484 100644 --- a/src/layouts/address-vehicles/address-vehicles.vue +++ b/src/layouts/address-vehicles/address-vehicles.vue @@ -162,8 +162,10 @@ export default { async forwardButtonAction() { const vinLookup = await this.lookupVin(this.selectedVehicle.vin).catch(() => { this.$refs.funnelFooter.removeLoader(); - return; }); + if (!vinLookup) { + return; + } this.isSelectedGlassAvailableForVehicle = await isGlassAvailableForCarId(vinLookup.data.carId); this.updateCustomerInfo(this.selectedVehicle.vin, this.selectedVehicle.vehicle); this.navigateForward(); @@ -210,7 +212,7 @@ export default { }, watch: { - selectedVehicleVin(vehicleVin) { + selectedVehicleVin() { // does this vehicle match the previously selected carId? this.isCarIdDifferent = this.selectedVehicle.vehicle.carId !== store.getters.vehicle.carId; this.$refs.funnelFooter.updateButtonText(`Continue with ${this.selectedVehicle.vehicle.year} ${this.selectedVehicle.vehicle.make} ${this.selectedVehicle.vehicle.model}`);