From: Ms Kimsible Date: Mon, 6 Sep 2021 14:31:44 +0000 (+0200) Subject: Fix undefined this.user.videoChannels on production build X-Git-Tag: v3.4.0~27 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=4546d92e40a253047d9648c0749578429dce1c3f;p=github%2FChocobozzz%2FPeerTube.git Fix undefined this.user.videoChannels on production build --- 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 { private authService: AuthService ) {} - get userInformationLoaded () { - return this.authService.userInformationLoaded - } - get hasChannelNotConfigured () { - return this.user.videoChannels - .filter((channel: VideoChannel) => (!channel.avatar || !channel.description)) - .length > 0 + if (!this.user.videoChannels) return + + return this.user.videoChannels.filter((channel: VideoChannel) => (!channel.avatar || !channel.description)).length > 0 } ngOnInit () {