Skip to content

Commit a27dcab

Browse files
committed
Convert ternary operator to if-else
1 parent 86ce0da commit a27dcab

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

packages/auth/src/core/auth/password_policy_impl.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,10 @@ export class PasswordPolicyImpl implements PasswordPolicyInternal {
6464
responseOptions.containsNonAlphanumericCharacter;
6565
}
6666

67-
const enforcementStateUnspecified =
68-
response.enforcementState === 'ENFORCEMENT_STATE_UNSPECIFIED';
69-
this.enforcementState = enforcementStateUnspecified
70-
? 'OFF'
71-
: response.enforcementState;
67+
this.enforcementState = response.enforcementState;
68+
if (this.enforcementState === 'ENFORCEMENT_STATE_UNSPECIFIED') {
69+
this.enforcementState = 'OFF';
70+
}
7271

7372
this.allowedNonAlphanumericCharacters =
7473
response.allowedNonAlphanumericCharacters.join('');

0 commit comments

Comments
 (0)