Fix logging the user out when renewing the token while the api is not reachable
This commit is contained in:
parent
7c656d4708
commit
2c273a7fd9
1 changed files with 6 additions and 1 deletions
|
@ -186,7 +186,12 @@ export default {
|
|||
.catch(e => {
|
||||
// eslint-disable-next-line
|
||||
console.log('Error renewing token: ', e)
|
||||
ctx.dispatch('logout')
|
||||
|
||||
// Don't logout on network errors as the user would then get logged out if they don't have
|
||||
// internet for a short period of time - such as when the laptop is still reconnecting
|
||||
if (e.request.status) {
|
||||
ctx.dispatch('logout')
|
||||
}
|
||||
})
|
||||
},
|
||||
logout(ctx) {
|
||||
|
|
Loading…
Reference in a new issue