diff options
author | Chocobozzz <me@florianbigard.com> | 2022-03-21 09:11:11 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-03-21 09:11:11 +0100 |
commit | 9ca5728be138fad03a63b6701cd4164a9433509d (patch) | |
tree | 269ef011f3c5fd9ed109a4cb6688b96a682e4745 | |
parent | b4a4bcd20e401a6e7db4345a0a5cc238c6b99200 (diff) | |
download | PeerTube-9ca5728be138fad03a63b6701cd4164a9433509d.tar.gz PeerTube-9ca5728be138fad03a63b6701cd4164a9433509d.tar.zst PeerTube-9ca5728be138fad03a63b6701cd4164a9433509d.zip |
Fix channel edition page
-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 | ||