fix(forms): properly handle special properties in FormGroup.get (#22249)

closes #17195

PR Close #22249
This commit is contained in:
Trotyl
2018-04-07 15:11:02 +08:00
committed by Victor Berchet
parent 87b16710e7
commit 9367e91402
2 changed files with 13 additions and 1 deletions

View File

@ -629,6 +629,18 @@ import {of } from 'rxjs';
});
});
describe('retrieve', () => {
let group: FormGroup;
beforeEach(() => {
group = new FormGroup({
'required': new FormControl('requiredValue'),
});
});
it('should not get inherited properties',
() => { expect(group.get('constructor')).toBe(null); });
});
describe('statusChanges', () => {
let control: FormControl;