Ensure we return a boolean

This commit is contained in:
Chocobozzz 2021-09-08 10:19:03 +02:00
parent 0ea2f79d45
commit 9e8a7e0837
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
<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>

View 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
}