1
0
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:
Oscar Hinton
2022-07-26 14:48:11 +02:00
committed by GitHub
parent c90eb42ead
commit 2011131bb2
58 changed files with 13362 additions and 18644 deletions

View File

@@ -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);
}