Skip to content

Commit c95a50f

Browse files
committed
refactor: use Object.keys instead of Object.values for browser support
1 parent 41f6177 commit c95a50f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

projects/ngneat/forms-manager/src/lib/forms-manager.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,11 @@ export class NgFormsManager<FormsState = any> {
630630
control.markAsDirty(options);
631631

632632
if (control instanceof FormGroup || control instanceof FormArray) {
633-
Object.values(control.controls).forEach((control: AbstractControl) => {
633+
let controls: AbstractControl[] = Object.keys(control.controls).map(
634+
controlName => control.controls[controlName]
635+
);
636+
637+
controls.forEach(control => {
634638
control.markAsDirty(options);
635639

636640
if ((control as FormGroup | FormArray).controls) {

0 commit comments

Comments
 (0)