From b3f6df7612300c61d5c939ba7d61c694339ebf1a Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Tue, 17 Oct 2023 15:06:06 -0400 Subject: [PATCH] Update pattern for resetting payment method --- src/store/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index 0b0f684eb..dd288c77a 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -2021,9 +2021,11 @@ export const actions = { }, savePaymentType(context, isInsurance) { - context.commit(storeMutations.UPDATE_IS_INSURANCE, isInsurance); + if (isInsurance !== context.getters.payment.isInsurance) { + context.commit(storeMutations.RESET_PAYMENT_METHOD_CHOICE); + } - context.commit(storeMutations.RESET_PAYMENT_METHOD_CHOICE); + context.commit(storeMutations.UPDATE_IS_INSURANCE, isInsurance); }, savePaymentMethodChoice(context, paymentMethod) {