herum-shared 0.1.36 → 0.1.37

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.
@@ -652,12 +652,9 @@ class HerumInputFieldComponent {
652
652
  if (this.ngControl instanceof FormControlName)
653
653
  this.formControlName = this.ngControl.name?.toString() || '';
654
654
  this.ngControl.control.statusChanges.pipe(takeUntil(this.destroySubject$)).subscribe(status => {
655
- console.log(Reflect.getPrototypeOf(this.ngControl.control));
656
- console.log(Reflect.getPrototypeOf(this.ngControl.control) === HerumFormControl.prototype);
657
- console.log(Reflect.getPrototypeOf(this.ngControl.control) === HerumFormControl);
658
- console.log(this.ngControl.control.constructor.name === HerumFormControl.prototype.constructor.name);
659
- if (this.ngControl.control instanceof HerumFormControl)
660
- this.errorMsg = this.ngControl.control.currentErrorMessage;
655
+ const controlWithErrorMessage = this.ngControl.control;
656
+ if (!!controlWithErrorMessage.currentErrorMessage)
657
+ this.errorMsg = controlWithErrorMessage.currentErrorMessage;
661
658
  const controlStatus = this.ngControl.control.status;
662
659
  this.isValid = controlStatus === formStatuses.valid;
663
660
  this.isLoading = controlStatus === formStatuses.pending;