From be0deefdceb16f18e80ff0b950ef064fc828ca64 Mon Sep 17 00:00:00 2001 From: Sean Date: Mon, 9 Nov 2020 16:18:26 +0100 Subject: [PATCH] Fix "remove all speaker" button Remove all speakers was always deactivated --- .../list-of-speakers-content.component.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/client/src/app/shared/components/list-of-speakers-content/list-of-speakers-content.component.ts b/client/src/app/shared/components/list-of-speakers-content/list-of-speakers-content.component.ts index 7984bbd19..75e73a1c7 100644 --- a/client/src/app/shared/components/list-of-speakers-content/list-of-speakers-content.component.ts +++ b/client/src/app/shared/components/list-of-speakers-content/list-of-speakers-content.component.ts @@ -151,12 +151,11 @@ export class ListOfSpeakersContentComponent extends BaseViewComponentDirective i } private isListOfSpeakersEmpty(): void { - if (this.waitingSpeakers && this.waitingSpeakers.length) { - this.isListOfSpeakersEmptyEvent.emit(false); - } else if (this.finishedSpeakers && this.finishedSpeakers.length) { + if (this.waitingSpeakers?.length || this.finishedSpeakers?.length) { this.isListOfSpeakersEmptyEvent.emit(false); + } else { + return this.isListOfSpeakersEmptyEvent.emit(!this.activeSpeaker); } - return this.isListOfSpeakersEmptyEvent.emit(!this.activeSpeaker); } private updateCanReaddLastSpeaker(): void {