Skip to content

Commit 8bcbb93

Browse files
committed
Fix undefined check on custom strength options
1 parent 0135226 commit 8bcbb93

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,19 @@ export class PasswordPolicyImpl implements PasswordPolicyInternal {
4545
this.customStrengthOptions.maxPasswordLength =
4646
responseOptions.maxPasswordLength;
4747
}
48-
if (responseOptions.containsLowercaseCharacter) {
48+
if (responseOptions.containsLowercaseCharacter !== undefined) {
4949
this.customStrengthOptions.containsLowercaseLetter =
5050
responseOptions.containsLowercaseCharacter;
5151
}
52-
if (responseOptions.containsUppercaseCharacter) {
52+
if (responseOptions.containsUppercaseCharacter !== undefined) {
5353
this.customStrengthOptions.containsUppercaseLetter =
5454
responseOptions.containsUppercaseCharacter;
5555
}
56-
if (responseOptions.containsNumericCharacter) {
56+
if (responseOptions.containsNumericCharacter !== undefined) {
5757
this.customStrengthOptions.containsNumericCharacter =
5858
responseOptions.containsNumericCharacter;
5959
}
60-
if (responseOptions.containsNonAlphanumericCharacter) {
60+
if (responseOptions.containsNonAlphanumericCharacter !== undefined) {
6161
this.customStrengthOptions.containsNonAlphanumericCharacter =
6262
responseOptions.containsNonAlphanumericCharacter;
6363
}

0 commit comments

Comments
 (0)