Skip to content

Commit fb1ecee

Browse files
authored
Merge pull request #4 from FluorescentHallucinogen/fix-false-positive
How did it even work and pass the tests?
2 parents aac4d4c + 4d850a7 commit fb1ecee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ const prepareConstraintDirective = (validationCallback, errorMessageCallback) =>
7575
)
7676

7777
const errors = validate(this.args)
78-
if (errors) throw new Error(errors)
78+
if (errors && errors.length > 0) throw new Error(errors)
7979

8080
return originalResolver.apply(this, resolveArgs)
8181
}

0 commit comments

Comments
 (0)