@sumaris-net/ngx-components 2.4.158 → 2.4.160

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) {
@@ -14106,7 +14107,7 @@ class LocalSettingsService extends StartableService {
14106
14107
  return this._data && this._data.latLongFormat || 'DDMM';
14107
14108
  }
14108
14109
  get usageMode() {
14109
- return isNotNil(this._data.usageMode) ? this._data.usageMode : (isCapacitor(window) || isMobile(window) ? 'FIELD' : 'DESK');
14110
+ return isNotNil(this._data.usageMode) ? this._data.usageMode : isCapacitor(window) && isMobile(window) ? 'FIELD' : 'DESK';
14110
14111
  }
14111
14112
  get mobile() {
14112
14113
  return isNotNil(this._data.mobile) ? this._data.mobile : isMobile(window);