From 5526cde8693d51ede6e3ce4e0b24e0583bc95793 Mon Sep 17 00:00:00 2001 From: Davide Negretti Date: Fri, 10 Sep 2021 11:06:25 +0200 Subject: [PATCH] [CST-4058] LGTM issues solved --- .../group-registry/group-form/group-form.component.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/app/access-control/group-registry/group-form/group-form.component.ts b/src/app/access-control/group-registry/group-form/group-form.component.ts index 39adc61875..b2b9fab58d 100644 --- a/src/app/access-control/group-registry/group-form/group-form.component.ts +++ b/src/app/access-control/group-registry/group-form/group-form.component.ts @@ -208,7 +208,7 @@ export class GroupFormComponent implements OnInit, OnDestroy { this.formGroup.patchValue({ groupName: activeGroup.name, groupCommunity: linkedObject?.name ?? '', - groupDescription: activeGroup != null ? activeGroup.firstMetadataValue('dc.description') : '', + groupDescription: activeGroup.firstMetadataValue('dc.description'), }); } else { this.formModel = [ @@ -217,7 +217,7 @@ export class GroupFormComponent implements OnInit, OnDestroy { ]; this.formGroup.patchValue({ groupName: activeGroup.name, - groupDescription: activeGroup != null ? activeGroup.firstMetadataValue('dc.description') : '', + groupDescription: activeGroup.firstMetadataValue('dc.description'), }); } setTimeout(() => { @@ -446,11 +446,7 @@ export class GroupFormComponent implements OnInit, OnDestroy { if (hasValue(group) && hasValue(group._links.object.href)) { return this.getLinkedDSO(group).pipe( map((rd: RemoteData) => { - if (hasValue(rd) && hasValue(rd.payload)) { - return true; - } else { - return false; - } + return hasValue(rd) && hasValue(rd.payload); }), catchError(() => observableOf(false)), );