]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Ensure we return a boolean
authorChocobozzz <me@florianbigard.com>
Wed, 8 Sep 2021 08:19:03 +0000 (10:19 +0200)
committerChocobozzz <me@florianbigard.com>
Wed, 8 Sep 2021 08:19:03 +0000 (10:19 +0200)
client/src/app/shared/shared-main/misc/channels-setup-message.component.html
client/src/app/shared/shared-main/misc/channels-setup-message.component.ts

index 3f94fa04ce5d781a35605edfbed1bba2257497b5..3fe888a350a9ccb6ae533c6d143f142326b4951b 100644 (file)
@@ -1,7 +1,7 @@
-<div *ngIf="hasChannelNotConfigured" class="channels-setup-message alert alert-info">
+<div *ngIf="hasChannelNotConfigured()" class="channels-setup-message alert alert-info">
   <my-global-icon iconName="tip"></my-global-icon>
 
-  <div>  
+  <div>
     <div i18n>Some of your channels are not fully set up. Make them welcoming and explicit about what you publish by adding a <strong>banner</strong>, an <strong>avatar</strong> and a <strong>description</strong>.</div>
     <a *ngIf="!hideLink" class="channels-settings-link" routerLink="/my-library/video-channels" i18n>Set up my channels</a>
   </div>
index b21507a34fbaa5c3bfeb59a25b5335f107470587..702475029bd5973237372415094a3e9c3add83db 100644 (file)
@@ -16,8 +16,8 @@ export class ChannelsSetupMessageComponent implements OnInit {
     private authService: AuthService
   ) {}
 
-  get hasChannelNotConfigured () {
-    if (!this.user.videoChannels) return
+  hasChannelNotConfigured () {
+    if (!this.user.videoChannels) return false
 
     return this.user.videoChannels.filter((channel: VideoChannel) => (!channel.avatar || !channel.description)).length > 0
   }