Verified Commit 9e8a7e08 authored by Chocobozzz's avatar Chocobozzz
Browse files

Ensure we return a boolean

parent 0ea2f79d
<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 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>
......@@ -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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment