@klippa/ngx-enhancy-forms 5.3.2 → 5.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -59,27 +59,20 @@
59
59
  this.activeControls = [];
60
60
  }
61
61
  FormComponent.prototype.ngOnInit = function () {
62
- var _this = this;
63
62
  if (isValueSet(this.parent) && isValueSet(this.subFormPlaceholder)) {
64
- var injectInto_1 = this.subFormPlaceholder.injectInto;
65
- var injectAt_1 = this.subFormPlaceholder.at;
66
- if (injectInto_1 instanceof forms.FormArray) {
67
- if (typeof injectAt_1 !== 'number') {
68
- throw new Error("cannot index FormArray with " + typeof injectAt_1);
63
+ var injectInto = this.subFormPlaceholder.injectInto;
64
+ var injectAt = this.subFormPlaceholder.at;
65
+ if (injectInto instanceof forms.FormArray) {
66
+ if (typeof injectAt !== 'number') {
67
+ throw new Error("cannot index FormArray with " + typeof injectAt);
69
68
  }
70
- // do this next cycle to avoid 'ExpressionChangedAfterItHasBeenCheckedError'
71
- setTimeout(function () {
72
- injectInto_1.setControl(injectAt_1, _this.formGroup);
73
- });
69
+ injectInto.setControl(injectAt, this.formGroup);
74
70
  }
75
- else if (injectInto_1 instanceof forms.FormGroup) {
76
- if (typeof injectAt_1 !== 'string') {
77
- throw new Error("cannot index FormGroup with " + typeof injectAt_1);
71
+ else if (injectInto instanceof forms.FormGroup) {
72
+ if (typeof injectAt !== 'string') {
73
+ throw new Error("cannot index FormGroup with " + typeof injectAt);
78
74
  }
79
- // do this next cycle to avoid 'ExpressionChangedAfterItHasBeenCheckedError'
80
- setTimeout(function () {
81
- injectInto_1.setControl(injectAt_1, _this.formGroup);
82
- });
75
+ injectInto.setControl(injectAt, this.formGroup);
83
76
  }
84
77
  }
85
78
  if (isValueSet(this.patchValueInterceptor)) {