forked from vikunja/frontend
Fix logging the user out when renewing the token while the api is not reachable
This commit is contained in:
parent
7c656d4708
commit
2c273a7fd9
|
@ -186,7 +186,12 @@ export default {
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
// eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
console.log('Error renewing token: ', e)
|
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) {
|
logout(ctx) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user