Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a6683c6

Browse files
committed
fix bug on updating custom regex
1 parent 8c1dcc7 commit a6683c6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎projects/angular-material-extensions/password-strength/src/lib/component/mat-password-strength/mat-password-strength.component.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,12 @@ export class MatPasswordStrengthComponent implements OnInit, OnChanges, AfterCon
9696
}
9797

9898
ngOnChanges(changes: SimpleChanges): void {
99-
if ((changes.externalError && changes.externalError.firstChange) || changes.password.isFirstChange()) {
99+
if ((changes.externalError && changes.externalError.firstChange) || (changes.password&&changes.password.firstChange)) {
100100
return;
101101
} else if (changes.externalError && changes.externalError.currentValue) {
102102
this._color = Colors.warn;
103103
return;
104-
} else if (changes.password.previousValue === changes.password.currentValue && !changes.password.firstChange) {
104+
} else if (changes.password&&changes.password.previousValue === changes.password.currentValue && !changes.password.firstChange) {
105105
this.calculatePasswordStrength();
106106
} else {
107107
this.password && this.password.length > 0 ?

‎src/module/component/mat-password-strength/mat-password-strength.component.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ export class MatPasswordStrengthComponent implements OnInit, OnChanges {
6565
}
6666

6767
ngOnChanges(changes: SimpleChanges): void {
68-
if ((changes.externalError && changes.externalError.firstChange) || changes.password.isFirstChange()) {
68+
if ((changes.externalError && changes.externalError.firstChange) || (changes.password&&changes.password.firstChange)) {
6969
return;
7070
} else if (changes.externalError && changes.externalError.currentValue) {
7171
this._color = Colors.warn;
7272
return;
73-
} else if (changes.password.previousValue === changes.password.currentValue && !changes.password.firstChange) {
73+
} else if (changes.password&&changes.password.previousValue === changes.password.currentValue && !changes.password.firstChange) {
7474
this.checkPassword();
7575
} else {
7676
this.password && this.password.length > 0 ?

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /