No longer expect a ValidationError to be an Error instance

parse-stacktrace-fix
Sven Slootweg 4 years ago
parent 29d1ed20a8
commit a0231a7fc3

@ -40,7 +40,7 @@ module.exports.compose = function composeValidators(validators) {
} else {
throw new Error(`The 'errors' in a validationResult must be an array`);
}
} else if (result instanceof Error && matchValidationError(result)) {
} else if (result != null && matchValidationError(result)) {
return {
errors: [ result ],
newValue: undefined

Loading…
Cancel
Save