diff --git a/src/store/index.js b/src/store/index.js index f6f773cfc..7ca6e5889 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1594,18 +1594,27 @@ export const actions = { context.dispatch(storeActions.RESET_DAMAGE_STATE_AND_DEPENDENCIES); context.dispatch(storeActions.RESET_REGISTRATION_STATE_AND_DEPENDENCIES); - if (context.state.order.vehicle.year !== year) { + if ( + context.state.order.vehicle.year != year || + context.state.order.vehicle.make != make || + context.state.order.vehicle.model != model || + context.state.order.vehicle.style != style + ) + context.commit(storeMutations.UPDATE_VEHICLE_VIN, null); + + if (context.state.order.vehicle.year != year) { context.commit(storeMutations.UPDATE_YEAR, year); } - if (context.state.order.vehicle.make !== make) { + if (context.state.order.vehicle.make != make) { context.commit(storeMutations.UPDATE_MAKE, make); } - if (context.state.order.vehicle.model !== model) { + if (context.state.order.vehicle.model != model) { context.commit(storeMutations.UPDATE_MODEL, model); } - if (context.state.order.vehicle.style !== style) { + if (context.state.order.vehicle.style != style) { context.commit(storeMutations.UPDATE_STYLE, style); } + context.commit(storeMutations.UPDATE_CAR_ID, carId); context.commit(storeMutations.UPDATE_VEHICLE_CATEGORY, category); context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_URL, imageUrl);