From a600a5050a33537f3d74c8f1f320c37da2edc26e Mon Sep 17 00:00:00 2001 From: Andrew Volostnykh Date: Mon, 1 Mar 2021 19:30:56 +0200 Subject: [PATCH] Refactoring --- ui-ngx/src/app/modules/home/pages/user/user.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-ngx/src/app/modules/home/pages/user/user.component.ts b/ui-ngx/src/app/modules/home/pages/user/user.component.ts index 1610eeaba8..f6fc69b7d6 100644 --- a/ui-ngx/src/app/modules/home/pages/user/user.component.ts +++ b/ui-ngx/src/app/modules/home/pages/user/user.component.ts @@ -60,7 +60,7 @@ export class UserComponent extends EntityComponent { } isUserCredentialPresent(): boolean { - return !(!this.entity || !this.entity.additionalInfo || isUndefined(this.entity.additionalInfo.userCredentialsEnabled)); + return this.entity && this.entity.additionalInfo && isDefinedAndNotNull(this.entity.additionalInfo.userCredentialsEnabled); } buildForm(entity: User): FormGroup {