Fix logout test
This commit is contained in:
parent
7b2e4b7177
commit
1ee8efc90e
1 changed files with 1 additions and 1 deletions
|
@ -88,7 +88,7 @@ export default {
|
||||||
// Check if the token is still valid if the window gets focus again to maybe renew it
|
// Check if the token is still valid if the window gets focus again to maybe renew it
|
||||||
window.addEventListener('focus', () => {
|
window.addEventListener('focus', () => {
|
||||||
|
|
||||||
const expiresIn = this.userInfo.exp - +new Date() / 1000
|
const expiresIn = (this.userInfo !== null ? this.userInfo.exp : 0) - +new Date() / 1000
|
||||||
|
|
||||||
// If the token expiry is negative, it is already expired and we have no choice but to redirect
|
// If the token expiry is negative, it is already expired and we have no choice but to redirect
|
||||||
// the user to the login page
|
// the user to the login page
|
||||||
|
|
Loading…
Reference in a new issue