diff --git a/src/store/index.js b/src/store/index.js index 82d3323d1..64ba356e6 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -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; });