Skip to content

Commit

Permalink
fix: 馃悰 error class not removed
Browse files Browse the repository at this point in the history
  • Loading branch information
shaharkazaz committed Jul 17, 2023
1 parent b8b4a13 commit bb80943
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export class ControlErrorsDirective implements OnInit, OnDestroy {
const hasErrors = !!this.control.errors;
if (hasErrors) {
this.showError();
} else if (this.ref) {
} else {
this.hideError();
}
});
Expand Down Expand Up @@ -202,7 +202,9 @@ export class ControlErrorsDirective implements OnInit, OnDestroy {
*/
hideError(): void {
this.removeCustomClass();
this.setError(null);
if (this.ref) {
this.setError(null);
}
}

ngOnDestroy() {
Expand Down

0 comments on commit bb80943

Please sign in to comment.