fix(forms): properly handle special properties in FormGroup.get (#22249)
closes #17195 PR Close #22249
This commit is contained in:
@ -44,7 +44,7 @@ function _find(control: AbstractControl, path: Array<string|number>| string, del
|
||||
|
||||
return (<Array<string|number>>path).reduce((v: AbstractControl, name) => {
|
||||
if (v instanceof FormGroup) {
|
||||
return v.controls[name] || null;
|
||||
return v.controls.hasOwnProperty(name as string) ? v.controls[name] : null;
|
||||
}
|
||||
|
||||
if (v instanceof FormArray) {
|
||||
|
Reference in New Issue
Block a user