Fixes: toString of undefined

This commit is contained in:
Tom Moor
2019-03-02 21:11:36 -08:00
parent f1c14f943e
commit 67ed017122

View File

@ -24,8 +24,8 @@ export default function validation() {
}
};
ctx.assertUuid = (value, message) => {
if (!validator.isUUID(value.toString() || '')) {
ctx.assertUuid = (value = '', message) => {
if (!validator.isUUID(value)) {
throw new ValidationError(message);
}
};