mirror of https://github.com/Chocobozzz/PeerTube
Fix tokens loading
parent
7294aab0c8
commit
79f392a657
|
@ -25,11 +25,13 @@ export class AuthUser extends User implements ServerMyUserModel {
|
||||||
canSeeVideosLink = true
|
canSeeVideosLink = true
|
||||||
|
|
||||||
static load () {
|
static load () {
|
||||||
const userInfo = getUserInfoFromLocalStorage()
|
const tokens = Tokens.load()
|
||||||
|
if (!tokens) return null
|
||||||
|
|
||||||
|
const userInfo = getUserInfoFromLocalStorage()
|
||||||
if (!userInfo) return null
|
if (!userInfo) return null
|
||||||
|
|
||||||
return new AuthUser(userInfo, Tokens.load())
|
return new AuthUser(userInfo, tokens)
|
||||||
}
|
}
|
||||||
|
|
||||||
static flush () {
|
static flush () {
|
||||||
|
|
Loading…
Reference in New Issue