diff --git a/src/store/index.js b/src/store/index.js index e67eb7414..cc8dc0b39 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -336,8 +336,6 @@ export const mutations = { }, resetRegistrationState(state) { state.order.vehicle.registration.licensePlate = null; - state.order.customer.firstName = null; - state.order.customer.lastName = null; }, resetGlassPartsState(state) { state.order.lineItems.glassParts = null; @@ -1675,10 +1673,7 @@ export const actions = { { isSelectedGlassAvailableForVehicle, vehicleInfo, registrationInfo } ) { //Reset dependent state when changing - if ( - registrationInfo?.firstName !== context.state.order.customer?.firstName || - registrationInfo?.lastName !== context.state.order.customer?.lastName - ) { + if (vehicleInfo.vin !== context.state.order.vehicle.vin) { context.dispatch(storeActions.RESET_REGISTRATION_STATE_AND_DEPENDENCIES); if (!isSelectedGlassAvailableForVehicle) {