From 4546d92e40a253047d9648c0749578429dce1c3f Mon Sep 17 00:00:00 2001 From: Ms Kimsible Date: Mon, 6 Sep 2021 16:31:44 +0200 Subject: [PATCH] Fix undefined this.user.videoChannels on production build --- .../misc/channels-setup-message.component.ts | 10 +++------- 1 file 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 { 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 () { -- 2.41.0