@sumaris-net/ngx-components 2.1.1 → 2.1.2

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.
@@ -4486,7 +4486,7 @@ class FormArrayHelper {
4486
4486
  this.isEmpty = isEmpty;
4487
4487
  this._validators = options && options.validators;
4488
4488
  // empty array not allow by default
4489
- this.setAllowEmptyArray(toBoolean(options && options.allowEmptyArray, false));
4489
+ this.setAllowEmptyArray(toBoolean(options?.allowEmptyArray, false));
4490
4490
  }
4491
4491
  static getOrCreateArray(formBuilder, form, arrayName) {
4492
4492
  let arrayControl = form.get(arrayName);
@@ -4667,7 +4667,7 @@ class AppFormArray extends UntypedFormArray {
4667
4667
  this.setValidators(this.options.validators || null);
4668
4668
  }
4669
4669
  else {
4670
- const validators = Array.isArray(this.options.validators) ? this.options.validators : (this.options.validators ? [this.options.validators] : []);
4670
+ const validators = Array.isArray(this.options?.validators) ? this.options.validators : (this.options.validators ? [this.options.validators] : []);
4671
4671
  this.setValidators(validators.concat(SharedFormArrayValidators.requiredArrayMinLength(1)));
4672
4672
  }
4673
4673
  }