Consolidated if statements

This commit is contained in:
Chloe Herd 2023-06-15 14:55:06 -04:00
parent c92ff4d1b5
commit 8348781ca7

View file

@ -1868,22 +1868,14 @@ export const actions = {
saveServiceLocation(context, serviceLocationInfo) {
if (context.state.order.serviceLocationInfo) {
if (serviceLocationInfo.zipCode !== context.state.order.serviceLocationInfo.zipCode) {
context.commit(storeMutations.RESET_SCHEDULE);
}
if (
serviceLocationInfo.zipCode !== context.state.order.serviceLocationInfo.zipCode ||
!deepEqual(
serviceLocationInfo.provider,
context.state.order.serviceLocationInfo.provider
)
) {
context.commit(storeMutations.RESET_SCHEDULE);
}
if (
) ||
serviceLocationInfo.appointmentType !==
context.state.order.serviceLocationInfo.appointmentType
context.state.order.serviceLocationInfo.appointmentType
) {
context.commit(storeMutations.RESET_SCHEDULE);
}