Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Client: fix compilation about the user created date

Chocobozzz44c5275e1bdd
diff --git a/client/src/app/shared/users/user.model.ts b/client/src/app/shared/users/user.model.ts
index b775cb8e7b..726495d118 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() {