mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 22:03:36 +00:00
[PS-182] Upgrade Angular to V14 (#2948)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Component, Input } from "@angular/core";
|
||||
import { AbstractControl, FormGroup } from "@angular/forms";
|
||||
import { AbstractControl, UntypedFormGroup } from "@angular/forms";
|
||||
|
||||
@Component({
|
||||
selector: "bit-error-summary",
|
||||
@@ -13,7 +13,7 @@ import { AbstractControl, FormGroup } from "@angular/forms";
|
||||
})
|
||||
export class BitErrorSummary {
|
||||
@Input()
|
||||
formGroup: FormGroup;
|
||||
formGroup: UntypedFormGroup;
|
||||
|
||||
get errorCount(): number {
|
||||
return this.getErrorCount(this.formGroup);
|
||||
@@ -23,9 +23,9 @@ export class BitErrorSummary {
|
||||
return this.errorCount.toString();
|
||||
}
|
||||
|
||||
private getErrorCount(form: FormGroup): number {
|
||||
private getErrorCount(form: UntypedFormGroup): number {
|
||||
return Object.values(form.controls).reduce((acc: number, control: AbstractControl) => {
|
||||
if (control instanceof FormGroup) {
|
||||
if (control instanceof UntypedFormGroup) {
|
||||
return acc + this.getErrorCount(control);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user