CASH-353 - Added null check

This commit is contained in:
Minojhini Valaiyapathi 2025-04-09 14:37:14 -04:00
parent 552159d7a2
commit 5f9ce0f36c

View file

@ -301,13 +301,15 @@ export default {
return this.$refs.navbar.removeLoader();
}
this.displayInvalidZipAlert = false;
const closestShops = await this.findClosestApplicableShops(
this.serviceZipCode,
this.carId
);
this.displayNoServiceAlert = !closestShops?.data?.providers?.length;
if (this.displayNoServiceAlert) {
return this.$refs.navbar.removeLoader();
if (this.serviceZipCode != null) {
const closestShops = await this.findClosestApplicableShops(
this.serviceZipCode,
this.carId
);
this.displayNoServiceAlert = !closestShops?.data?.providers?.length;
if (this.displayNoServiceAlert) {
return this.$refs.navbar.removeLoader();
}
}
const carsFound = resultMap.vinLookupResponse.vinVehicles;