Skip to content

Commit

Permalink
refactor: refactored field showAsyncErrors
Browse files Browse the repository at this point in the history
  • Loading branch information
foxhound87 committed Jan 14, 2024
1 parent f891f24 commit 6face47
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -820,11 +820,9 @@ export default class Field extends Base implements FieldInterface {
}

showAsyncErrors(): void {
if (this.validationAsyncData?.valid === false) {
this.errorAsync = this.validationAsyncData?.message as string;
return;
}
this.errorAsync = null;
this.errorAsync = (this.validationAsyncData?.valid === false)
? this.validationAsyncData?.message as string
: null
}

observeValidationOnBlur(): void {
Expand Down

0 comments on commit 6face47

Please sign in to comment.