CSR-706 | Only clear state if referral does not match
This commit is contained in:
parent
33017fac2b
commit
62b72163d6
1 changed files with 4 additions and 0 deletions
|
|
@ -706,6 +706,10 @@ export const actions = {
|
||||||
accountNumber: accountNumber?.toString()
|
accountNumber: accountNumber?.toString()
|
||||||
},
|
},
|
||||||
}).then((response) => {
|
}).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);
|
context.commit(storeMutations.UPDATE_STATE_WITH_ORDER_INFORMATION, response.data);
|
||||||
return response;
|
return response;
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue