Fixes: Server error when validating UUID against empty value
This commit is contained in:
@ -25,7 +25,7 @@ export default function validation() {
|
||||
};
|
||||
|
||||
ctx.assertUuid = (value, message) => {
|
||||
if (!validator.isUUID(value.toString())) {
|
||||
if (!validator.isUUID(value.toString() || '')) {
|
||||
throw new ValidationError(message);
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user