diff options
Diffstat (limited to 'client/src/app/shared/shared-main')
-rw-r--r-- | client/src/app/shared/shared-main/account/actor.model.ts | 2 | ||||
-rw-r--r-- | client/src/app/shared/shared-main/video-channel/video-channel.model.ts | 6 |
2 files changed, 5 insertions, 3 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 bd693860d..977fdb7e5 100644 --- a/client/src/app/shared/shared-main/account/actor.model.ts +++ b/client/src/app/shared/shared-main/account/actor.model.ts | |||
@@ -55,7 +55,7 @@ export abstract class Actor implements ServerActor { | |||
55 | 55 | ||
56 | if (hash.createdAt) this.createdAt = new Date(hash.createdAt.toString()) | 56 | if (hash.createdAt) this.createdAt = new Date(hash.createdAt.toString()) |
57 | 57 | ||
58 | this.avatars = hash.avatars | 58 | this.avatars = hash.avatars || [] |
59 | this.isLocal = Actor.IS_LOCAL(this.host) | 59 | this.isLocal = Actor.IS_LOCAL(this.host) |
60 | } | 60 | } |
61 | } | 61 | } |
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 e22b0cfd0..32376bf62 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 | |||
@@ -33,7 +33,9 @@ export class VideoChannel extends Actor implements ServerVideoChannel { | |||
33 | } | 33 | } |
34 | 34 | ||
35 | static GET_ACTOR_BANNER_URL (channel: ServerVideoChannel) { | 35 | static GET_ACTOR_BANNER_URL (channel: ServerVideoChannel) { |
36 | if (!channel) return '' | 36 | if (!channel || channel.banners.length === 0) { |
37 | return '' | ||
38 | } | ||
37 | 39 | ||
38 | const banner = channel.banners[0] | 40 | const banner = channel.banners[0] |
39 | if (!banner) return '' | 41 | if (!banner) return '' |
@@ -57,7 +59,7 @@ export class VideoChannel extends Actor implements ServerVideoChannel { | |||
57 | this.description = hash.description | 59 | this.description = hash.description |
58 | this.support = hash.support | 60 | this.support = hash.support |
59 | 61 | ||
60 | this.banners = hash.banners | 62 | this.banners = hash.banners || [] |
61 | 63 | ||
62 | this.isLocal = hash.isLocal | 64 | this.isLocal = hash.isLocal |
63 | 65 | ||