]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Client: fix compilation about the user created date
authorChocobozzz <florian.bigard@gmail.com>
Fri, 23 Sep 2016 15:34:18 +0000 (17:34 +0200)
committerChocobozzz <florian.bigard@gmail.com>
Fri, 23 Sep 2016 15:34:18 +0000 (17:34 +0200)
client/src/app/shared/users/user.model.ts

index b775cb8e7bc08c6321920907e4708a4fc0f1a18a..726495d1182721d095bcca3e11ee72da5b782cb5 100644 (file)
@@ -4,11 +4,14 @@ export class User {
   role: string;
   createdDate: Date;
 
-  constructor(hash: { id: string, username: string, role: string, createdDate: Date }) {
+  constructor(hash: { id: string, username: string, role: string, createdDate?: Date }) {
     this.id = hash.id;
     this.username = hash.username;
     this.role = hash.role;
-    this.createdDate = hash.createdDate;
+
+    if (hash.createdDate) {
+      this.createdDate = hash.createdDate;
+    }
   }
 
   isAdmin() {