diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-09-23 17:34:18 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-09-23 17:34:18 +0200 |
commit | 44c5275e1bdd1d4b4c23f7c423034e4293c927b3 (patch) | |
tree | 31d96db4d887d67605bbb1c7ea0ec11ec13f4d7a /client | |
parent | c53d2a4e5e3431f0b18c751c9afd5fe3d7f530f6 (diff) | |
download | PeerTube-44c5275e1bdd1d4b4c23f7c423034e4293c927b3.tar.gz PeerTube-44c5275e1bdd1d4b4c23f7c423034e4293c927b3.tar.zst PeerTube-44c5275e1bdd1d4b4c23f7c423034e4293c927b3.zip |
Client: fix compilation about the user created date
Diffstat (limited to 'client')
-rw-r--r-- | client/src/app/shared/users/user.model.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/client/src/app/shared/users/user.model.ts b/client/src/app/shared/users/user.model.ts index b775cb8e7..726495d11 100644 --- a/client/src/app/shared/users/user.model.ts +++ b/client/src/app/shared/users/user.model.ts | |||
@@ -4,11 +4,14 @@ export class User { | |||
4 | role: string; | 4 | role: string; |
5 | createdDate: Date; | 5 | createdDate: Date; |
6 | 6 | ||
7 | constructor(hash: { id: string, username: string, role: string, createdDate: Date }) { | 7 | constructor(hash: { id: string, username: string, role: string, createdDate?: Date }) { |
8 | this.id = hash.id; | 8 | this.id = hash.id; |
9 | this.username = hash.username; | 9 | this.username = hash.username; |
10 | this.role = hash.role; | 10 | this.role = hash.role; |
11 | this.createdDate = hash.createdDate; | 11 | |
12 | if (hash.createdDate) { | ||
13 | this.createdDate = hash.createdDate; | ||
14 | } | ||
12 | } | 15 | } |
13 | 16 | ||
14 | isAdmin() { | 17 | isAdmin() { |