From cd452eeb45e01ed20047a67390ac79129564709f Mon Sep 17 00:00:00 2001 From: Matej Gerek Date: Wed, 9 Oct 2024 10:04:49 +0200 Subject: [PATCH] Destructure isUsed in assistant component --- libs/ui/src/lib/assistant/assistant.component.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/libs/ui/src/lib/assistant/assistant.component.ts b/libs/ui/src/lib/assistant/assistant.component.ts index 7cc293dd2..457db569b 100644 --- a/libs/ui/src/lib/assistant/assistant.component.ts +++ b/libs/ui/src/lib/assistant/assistant.component.ts @@ -165,14 +165,12 @@ export class GfAssistantComponent implements OnChanges, OnDestroy, OnInit { }; }); this.tags = this.user?.tags - .filter((tag) => tag.isUsed) - .map(({ id, name }) => { - return { - id, - label: translate(name), - type: 'TAG' - }; - }); + .filter(({ isUsed }) => isUsed) + .map(({ id, name }) => ({ + id, + label: translate(name), + type: 'TAG' + })); this.searchFormControl.valueChanges .pipe(