
committed by
Miško Hevery

parent
1ae77da609
commit
6ab5f3648a
@ -48,11 +48,11 @@ function _find(control: AbstractControl, path: Array<string|number>| string, del
|
||||
if (path == null) return null;
|
||||
|
||||
if (!(path instanceof Array)) {
|
||||
path = (<string>path).split(delimiter);
|
||||
path = path.split(delimiter);
|
||||
}
|
||||
if (path instanceof Array && (path.length === 0)) return null;
|
||||
if (path instanceof Array && path.length === 0) return null;
|
||||
|
||||
return (<Array<string|number>>path).reduce((v: AbstractControl | null, name) => {
|
||||
return path.reduce((v: AbstractControl | null, name) => {
|
||||
if (v instanceof FormGroup) {
|
||||
return v.controls.hasOwnProperty(name as string) ? v.controls[name] : null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user