diff --git a/src/app/components/shared/_dialogs/topic-cloud-administration/topic-cloud-administration.component.ts b/src/app/components/shared/_dialogs/topic-cloud-administration/topic-cloud-administration.component.ts index c906a985b6540e792c88a9889d9fbab1c20de296..c304e9e266f55579b5b530877f6735a089027111 100644 --- a/src/app/components/shared/_dialogs/topic-cloud-administration/topic-cloud-administration.component.ts +++ b/src/app/components/shared/_dialogs/topic-cloud-administration/topic-cloud-administration.component.ts @@ -103,13 +103,13 @@ export class TopicCloudAdministrationComponent implements OnInit, OnDestroy { this.commentService.getAckComments(localStorage.getItem('roomId')).subscribe(comments => { this.keywords = []; comments.forEach(comment => { - let keywords: string[]; - if (this.keywordORfulltext === KeywordOrFulltext[KeywordOrFulltext.keyword]){ + let keywords = comment.keywordsFromQuestioner; + if (this.keywordORfulltext === KeywordOrFulltext[KeywordOrFulltext.both]) { + if (!keywords || !keywords.length) { + keywords = comment.keywordsFromSpacy; + } + } else if (this.keywordORfulltext === KeywordOrFulltext[KeywordOrFulltext.fulltext]) { keywords = comment.keywordsFromSpacy; - } else if (this.keywordORfulltext === KeywordOrFulltext[KeywordOrFulltext.both]){ - keywords = comment.keywordsFromQuestioner.concat(comment.keywordsFromSpacy); - } else { - keywords = comment.keywordsFromQuestioner; } if (!keywords) { keywords = [];