Client - cancel duplicate api calls

This commit is contained in:
Sam
2022-09-19 10:53:31 +02:00
parent 6982f5320a
commit a040b0c845
5 changed files with 73 additions and 3 deletions

View File

@ -142,8 +142,10 @@ export const actions: ActionTree<IAuthUserState, IRootState> &
}
})
.catch((error) => {
handleError(context, error)
removeAuthUserData(context)
if (error.message !== 'canceled') {
handleError(context, error)
removeAuthUserData(context)
}
})
},
[AUTH_USER_STORE.ACTIONS.LOGIN_OR_REGISTER](