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() {