@sumaris-net/ngx-components 2.4.157 → 2.4.159

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.
@@ -4897,7 +4897,8 @@ class AppFormArray extends UntypedFormArray {
4897
4897
  const disabled = this.disabled; // Save enabled here, because update can occur from resizeArray()
4898
4898
  // Reduce
4899
4899
  while (this.length > length) {
4900
- this.removeAt(this.length - 1, { emitEvent: options?.emitEvent });
4900
+ // WARN: We use super.removeAt() and NOT this.removeAt(), to avoid infinite loop, when calling resize(0) AND options.allowEmptyArray=false
4901
+ super.removeAt(this.length - 1, { emitEvent: options?.emitEvent });
4901
4902
  }
4902
4903
  // Or increase size
4903
4904
  while (this.length < length) {