CSR-706 | Only clear state if referral does not match

This commit is contained in:
Scott Kiener 2022-07-25 15:29:44 -04:00
parent 33017fac2b
commit 62b72163d6

View file

@ -706,6 +706,10 @@ export const actions = {
accountNumber: accountNumber?.toString()
},
}).then((response) => {
// clear the state if the existing referral number does not equal what is returned from loadOrder
if (context.state.order.referralNumber != response.data.referralNumber) {
context.commit(storeMutations.RESET_STATE);
}
context.commit(storeMutations.UPDATE_STATE_WITH_ORDER_INFORMATION, response.data);
return response;
});