Fix logging the user out when renewing the token while the api is not reachable
continuous-integration/drone/push Build is passing Details

This commit is contained in:
kolaente 2020-12-24 01:43:52 +01:00
parent 7c656d4708
commit 2c273a7fd9
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 6 additions and 1 deletions

View File

@ -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) {