X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fshared-main%2Fvideo-channel%2Fvideo-channel.model.ts;h=32376bf625d554f93daee5adb56436c742aa4f3f;hb=ab623c0e0b4815bd69a94887241a69aaa857ed26;hp=e22b0cfd0360c4f37485dfa7ea4e0e3ab866bd0d;hpb=d0800f7661f13fabe7bb6f4aa0ea50764f106405;p=github%2FChocobozzz%2FPeerTube.git 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 { } static GET_ACTOR_BANNER_URL (channel: ServerVideoChannel) { - if (!channel) return '' + if (!channel || channel.banners.length === 0) { + return '' + } const banner = channel.banners[0] if (!banner) return '' @@ -57,7 +59,7 @@ export class VideoChannel extends Actor implements ServerVideoChannel { this.description = hash.description this.support = hash.support - this.banners = hash.banners + this.banners = hash.banners || [] this.isLocal = hash.isLocal