@klippa/ngx-enhancy-forms 11.8.2 → 11.8.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.
@@ -158,7 +158,7 @@ class FormComponent {
158
158
  if (typeof injectAt !== 'number') {
159
159
  throw new Error(`cannot index FormArray with ${typeof injectAt}`);
160
160
  }
161
- if (injectInto.at(injectAt).disabled) {
161
+ if (injectInto.at(injectAt)?.disabled) {
162
162
  this.formGroup.disable();
163
163
  }
164
164
  injectInto.setControl(injectAt, this.formGroup);
@@ -167,7 +167,7 @@ class FormComponent {
167
167
  if (typeof injectAt !== 'string') {
168
168
  throw new Error(`cannot index FormGroup with ${typeof injectAt}`);
169
169
  }
170
- if (injectInto.get(injectAt).disabled) {
170
+ if (injectInto.get(injectAt)?.disabled) {
171
171
  this.formGroup.disable();
172
172
  }
173
173
  injectInto.setControl(injectAt, this.formGroup);