This commit is contained in:
Katie Kroell 2023-07-03 14:13:13 -04:00
parent 33a617ea25
commit fd1f630677

View file

@ -196,24 +196,22 @@ export default {
if (vehicle?.error === true) { if (vehicle?.error === true) {
this.mainStore.resetVehicleState(); this.mainStore.resetVehicleState();
this.displayGeneric = true; this.displayGeneric = true;
return; } else {
}
// save selected vehicle to the store // save selected vehicle to the store
this.mainStore.updateVehicle(vehicle?.data); this.mainStore.updateVehicle(vehicle?.data);
this.displayGeneric = true; this.displayGeneric = true;
// get the style(s) associated with the selected YMM // get the style(s) associated with the selected YMM
const styleOptions = await this.mainStore.getVehicleStyles( const styleOptions = await this.mainStore.getVehicleStyles(
vehicle?.data.year, vehicle.data.year,
vehicle?.data.make, vehicle.data.make,
vehicle?.data.model vehicle.data.model,
) );
// if there is more than 1 style for the selected vehicle, display generic/blurred image // if there is more than 1 style for the selected vehicle, display generic/blurred image
this.displayGeneric = styleOptions?.data?.length > 1; this.displayGeneric = styleOptions?.data?.length > 1;
} }
} }
}
}, },
components: { components: {
siteHeader, siteHeader,