Avoid normalizing empty fields
This commit is contained in:
@@ -45,6 +45,10 @@ function getEventData (req, res) {
|
||||
}
|
||||
|
||||
function normalizedField (field) {
|
||||
if (!field) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return field.toString().trim().substr(0, MAX_LENGTH);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user