Skip to content

Commit bce108a

Browse files
dylhunnalxhub
authored andcommitted
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
1 parent 240edcb commit bce108a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/forms/src/model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1865,7 +1865,7 @@ export class FormGroup extends AbstractControl {
18651865
/** @internal */
18661866
_reduceValue() {
18671867
return this._reduceChildren(
1868-
{}, (acc: {[k: string]: AbstractControl}, control: AbstractControl, name: string) => {
1868+
{}, (acc: {[k: string]: any}, control: AbstractControl, name: string): any => {
18691869
if (control.enabled || this.disabled) {
18701870
acc[name] = control.value;
18711871
}

0 commit comments

Comments
 (0)