diff --git a/packages/forms/src/model.ts b/packages/forms/src/model.ts index 40db3ff6b7..311c27b8f3 100644 --- a/packages/forms/src/model.ts +++ b/packages/forms/src/model.ts @@ -47,10 +47,10 @@ export const DISABLED = 'DISABLED'; function _find(control: AbstractControl, path: Array| string, delimiter: string) { if (path == null) return null; - if (!(path instanceof Array)) { + if (!Array.isArray(path)) { path = path.split(delimiter); } - if (path instanceof Array && path.length === 0) return null; + if (Array.isArray(path) && path.length === 0) return null; return path.reduce((v: AbstractControl | null, name) => { if (v instanceof FormGroup) {