From 44c5275e1bdd1d4b4c23f7c423034e4293c927b3 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 23 Sep 2016 17:34:18 +0200 Subject: Client: fix compilation about the user created date --- client/src/app/shared/users/user.model.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'client') 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 { 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() { -- cgit v1.2.3