From 8348781ca7e109431292de0b6490ce0169f0319b Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Thu, 15 Jun 2023 14:55:06 -0400 Subject: [PATCH] Consolidated if statements --- src/store/index.js | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index ec015d9a6..99a28e212 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -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); }