diff options
Diffstat (limited to 'client/src/app/shared/shared-main')
-rw-r--r-- | client/src/app/shared/shared-main/account/actor.model.ts | 8 | ||||
-rw-r--r-- | client/src/app/shared/shared-main/video-channel/video-channel.model.ts | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/client/src/app/shared/shared-main/account/actor.model.ts b/client/src/app/shared/shared-main/account/actor.model.ts index 670823060..1ee0c297e 100644 --- a/client/src/app/shared/shared-main/account/actor.model.ts +++ b/client/src/app/shared/shared-main/account/actor.model.ts | |||
@@ -47,11 +47,11 @@ export abstract class Actor implements ActorServer { | |||
47 | return host.trim() === thisHost | 47 | return host.trim() === thisHost |
48 | } | 48 | } |
49 | 49 | ||
50 | protected constructor (hash: ActorServer) { | 50 | protected constructor (hash: Partial<ActorServer>) { |
51 | this.id = hash.id | 51 | this.id = hash.id |
52 | this.url = hash.url | 52 | this.url = hash.url ?? '' |
53 | this.name = hash.name | 53 | this.name = hash.name ?? '' |
54 | this.host = hash.host | 54 | this.host = hash.host ?? '' |
55 | this.followingCount = hash.followingCount | 55 | this.followingCount = hash.followingCount |
56 | this.followersCount = hash.followersCount | 56 | this.followersCount = hash.followersCount |
57 | 57 | ||
diff --git a/client/src/app/shared/shared-main/video-channel/video-channel.model.ts b/client/src/app/shared/shared-main/video-channel/video-channel.model.ts index d8be42eef..1ba3fcc0e 100644 --- a/client/src/app/shared/shared-main/video-channel/video-channel.model.ts +++ b/client/src/app/shared/shared-main/video-channel/video-channel.model.ts | |||
@@ -44,7 +44,7 @@ export class VideoChannel extends Actor implements ServerVideoChannel { | |||
44 | return `${window.location.origin}/client/assets/images/default-avatar-videochannel.png` | 44 | return `${window.location.origin}/client/assets/images/default-avatar-videochannel.png` |
45 | } | 45 | } |
46 | 46 | ||
47 | constructor (hash: ServerVideoChannel) { | 47 | constructor (hash: Partial<ServerVideoChannel>) { |
48 | super(hash) | 48 | super(hash) |
49 | 49 | ||
50 | this.displayName = hash.displayName | 50 | this.displayName = hash.displayName |
@@ -93,7 +93,7 @@ export class VideoChannel extends Actor implements ServerVideoChannel { | |||
93 | this.updateBanner(null) | 93 | this.updateBanner(null) |
94 | } | 94 | } |
95 | 95 | ||
96 | private updateComputedAttributes () { | 96 | updateComputedAttributes () { |
97 | this.avatarUrl = VideoChannel.GET_ACTOR_AVATAR_URL(this) | 97 | this.avatarUrl = VideoChannel.GET_ACTOR_AVATAR_URL(this) |
98 | this.bannerUrl = VideoChannel.GET_ACTOR_BANNER_URL(this) | 98 | this.bannerUrl = VideoChannel.GET_ACTOR_BANNER_URL(this) |
99 | } | 99 | } |