mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(forms): _reduceValue arrow function now has correct types. (#44483)
I previously strengthened some weak types in #44370. One of these fixes exposed an incorrect call into `_reduceChildren` from `_reduceValue`. This was caught in google3 by a caller who was extending `FormGroup` and overriding these methods. Special thanks to Bart G for catching this issue and suggesting a fix. PR Close #44483
This commit is contained in:
committed by
Alex Rickabaugh
parent
72092ebd26
commit
6a0dadf46f
@@ -1914,7 +1914,7 @@ export class FormGroup extends AbstractControl {
|
||||
/** @internal */
|
||||
_reduceValue() {
|
||||
return this._reduceChildren(
|
||||
{}, (acc: {[k: string]: AbstractControl}, control: AbstractControl, name: string) => {
|
||||
{}, (acc: {[k: string]: any}, control: AbstractControl, name: string): any => {
|
||||
if (control.enabled || this.disabled) {
|
||||
acc[name] = control.value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user