]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix undefined this.user.videoChannels on production build
authorMs Kimsible <kimsible@users.noreply.github.com>
Mon, 6 Sep 2021 14:31:44 +0000 (16:31 +0200)
committerChocobozzz <chocobozzz@cpy.re>
Wed, 8 Sep 2021 08:16:33 +0000 (10:16 +0200)
client/src/app/shared/shared-main/misc/channels-setup-message.component.ts

index 50b98841adc21e48d1f97964ab182eca618fcadc..b21507a34fbaa5c3bfeb59a25b5335f107470587 100644 (file)
@@ -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 () {