diff options
author | Ms Kimsible <kimsible@users.noreply.github.com> | 2021-09-06 16:31:44 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-09-08 10:16:33 +0200 |
commit | 4546d92e40a253047d9648c0749578429dce1c3f (patch) | |
tree | 7b9081748f2b7a9175ba041135659bfb53f25531 /client | |
parent | b16e0cf2484e482105f236f5f3155e467cf71a2f (diff) | |
download | PeerTube-4546d92e40a253047d9648c0749578429dce1c3f.tar.gz PeerTube-4546d92e40a253047d9648c0749578429dce1c3f.tar.zst PeerTube-4546d92e40a253047d9648c0749578429dce1c3f.zip |
Fix undefined this.user.videoChannels on production build
Diffstat (limited to 'client')
-rw-r--r-- | client/src/app/shared/shared-main/misc/channels-setup-message.component.ts | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/client/src/app/shared/shared-main/misc/channels-setup-message.component.ts b/client/src/app/shared/shared-main/misc/channels-setup-message.component.ts index 50b98841a..b21507a34 100644 --- a/client/src/app/shared/shared-main/misc/channels-setup-message.component.ts +++ b/client/src/app/shared/shared-main/misc/channels-setup-message.component.ts | |||
@@ -16,14 +16,10 @@ export class ChannelsSetupMessageComponent implements OnInit { | |||
16 | private authService: AuthService | 16 | private authService: AuthService |
17 | ) {} | 17 | ) {} |
18 | 18 | ||
19 | get userInformationLoaded () { | ||
20 | return this.authService.userInformationLoaded | ||
21 | } | ||
22 | |||
23 | get hasChannelNotConfigured () { | 19 | get hasChannelNotConfigured () { |
24 | return this.user.videoChannels | 20 | if (!this.user.videoChannels) return |
25 | .filter((channel: VideoChannel) => (!channel.avatar || !channel.description)) | 21 | |
26 | .length > 0 | 22 | return this.user.videoChannels.filter((channel: VideoChannel) => (!channel.avatar || !channel.description)).length > 0 |
27 | } | 23 | } |
28 | 24 | ||
29 | ngOnInit () { | 25 | ngOnInit () { |