@firestitch/form 12.4.12 → 12.4.13

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.
@@ -1359,9 +1359,16 @@
1359
1359
  };
1360
1360
  FsControlDirective.prototype.ngAfterContentInit = function () {
1361
1361
  if (this._control) {
1362
- this._control.statusChanges
1363
- .pipe(operators.takeUntil(this._destroy$))
1364
- .subscribe(this.render.bind(this));
1362
+ /*
1363
+ Ensure that statusChanges has one subscription per control. Multiple can happen
1364
+ when multiple fsForm validation directives are applied to the same element
1365
+ */
1366
+ if (!this._control.statusChangesSubscribe) {
1367
+ this._control.statusChanges
1368
+ .pipe(operators.takeUntil(this._destroy$))
1369
+ .subscribe(this.render.bind(this));
1370
+ this._control.statusChangesSubscribe = true;
1371
+ }
1365
1372
  }
1366
1373
  };
1367
1374
  FsControlDirective.prototype.getMessageSelector = function () {
@@ -1430,10 +1437,6 @@
1430
1437
  */
1431
1438
  FsControlDirective.prototype.render = function () {
1432
1439
  var _a, _b;
1433
- if (this._control.statusChangesSubscribe) {
1434
- return;
1435
- }
1436
- this._control.statusChangesSubscribe = true;
1437
1440
  if (this.ngControl) {
1438
1441
  var renderer = this.renderer2;
1439
1442
  var wrapper = this.getWrapperElement();
@@ -1754,7 +1757,7 @@
1754
1757
  }
1755
1758
  }
1756
1759
  return stream$
1757
- .pipe(operators.map(function () { return null; }), operators.catchError(function (err) {
1760
+ .pipe(operators.mapTo(null), operators.catchError(function (err) {
1758
1761
  return rxjs.of({ validationError: err });
1759
1762
  }), operators.take(1));
1760
1763
  };