Skip to content

Commit

Permalink
fix: return null from validators when valid
Browse files Browse the repository at this point in the history
  • Loading branch information
sibiraj-s committed Dec 30, 2020
1 parent 9416a97 commit 398e1d5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib/validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@ export class Validators {
&& node?.firstChild?.isTextblock
&& node.firstChild.content.size === 0;

if (!isEmpty) {
return null;
}

return {
required: isEmpty
required: true
};
};
}
Expand Down

0 comments on commit 398e1d5

Please sign in to comment.