From 398e1d5988b208350daaac1db58fb7efbde2ccea Mon Sep 17 00:00:00 2001 From: sibiraj-s Date: Wed, 30 Dec 2020 10:21:08 +0530 Subject: [PATCH] fix: return null from validators when valid --- src/lib/validators.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/validators.ts b/src/lib/validators.ts index fc132818..8325224a 100644 --- a/src/lib/validators.ts +++ b/src/lib/validators.ts @@ -21,8 +21,12 @@ export class Validators { && node?.firstChild?.isTextblock && node.firstChild.content.size === 0; + if (!isEmpty) { + return null; + } + return { - required: isEmpty + required: true }; }; }