diff options
author | Chocobozzz <me@florianbigard.com> | 2020-08-21 13:49:48 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-08-21 15:39:51 +0200 |
commit | 79f392a6578f67d74da3dbf883a9f4b40c35124b (patch) | |
tree | c946acf593f7098033873bfa8d19ba727b8b9c33 /client | |
parent | 7294aab0c879ef96c0fde15c389a2c4c1463d3c7 (diff) | |
download | PeerTube-79f392a6578f67d74da3dbf883a9f4b40c35124b.tar.gz PeerTube-79f392a6578f67d74da3dbf883a9f4b40c35124b.tar.zst PeerTube-79f392a6578f67d74da3dbf883a9f4b40c35124b.zip |
Fix tokens loading
Diffstat (limited to 'client')
-rw-r--r-- | client/src/app/core/auth/auth-user.model.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/client/src/app/core/auth/auth-user.model.ts b/client/src/app/core/auth/auth-user.model.ts index 34efa24fc..f10b37e5a 100644 --- a/client/src/app/core/auth/auth-user.model.ts +++ b/client/src/app/core/auth/auth-user.model.ts | |||
@@ -25,11 +25,13 @@ export class AuthUser extends User implements ServerMyUserModel { | |||
25 | canSeeVideosLink = true | 25 | canSeeVideosLink = true |
26 | 26 | ||
27 | static load () { | 27 | static load () { |
28 | const userInfo = getUserInfoFromLocalStorage() | 28 | const tokens = Tokens.load() |
29 | if (!tokens) return null | ||
29 | 30 | ||
31 | const userInfo = getUserInfoFromLocalStorage() | ||
30 | if (!userInfo) return null | 32 | if (!userInfo) return null |
31 | 33 | ||
32 | return new AuthUser(userInfo, Tokens.load()) | 34 | return new AuthUser(userInfo, tokens) |
33 | } | 35 | } |
34 | 36 | ||
35 | static flush () { | 37 | static flush () { |