From b9a5e0d03ef4af0b015085e6b03e63aa0eb1fb34 Mon Sep 17 00:00:00 2001 From: Matt Sykes Date: Wed, 14 Dec 2022 09:35:41 -0500 Subject: [PATCH] extra if check --- src/layouts/vin-lookup/vin-lookup.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/layouts/vin-lookup/vin-lookup.vue b/src/layouts/vin-lookup/vin-lookup.vue index 103e14a57..990fd0658 100644 --- a/src/layouts/vin-lookup/vin-lookup.vue +++ b/src/layouts/vin-lookup/vin-lookup.vue @@ -325,10 +325,13 @@ export default { // If a VIN has already been found. Validate the Service Zip (in case of changes) const zipCodeData = await this.getZipCodeData(this.serviceZipCode); - // Check if Service Zip entered is serviceable + // Check if Service Zip entered is serviceable then save the ZIP info and email address if (zipCodeData.isServiceable) { - // If the Service Zip entered is serviceable then save the Zip Info and Email Address and navigate forward - if (this.$store.getters.order.serviceLocation.zipCode != this.serviceZipCode) { + //Only save the service location if the zip changed or we lack zipCodeCtu + if ( + this.$store.getters.order.serviceLocation.zipCode != this.serviceZipCode || + !this.$store.getters.order.serviceLocation.zipCodeCtu + ) { const vehicleRegistrationInfo = this.$store.getters.vehicle.registration; if (vehicleRegistrationInfo.zipCode == this.serviceZipCode) { await this.dispatchStoreAction(