Avoid normalizing empty fields

This commit is contained in:
Esther Lozano
2020-02-26 17:41:41 +01:00
parent 34c446909e
commit 1888302cee
+4
View File
@@ -45,6 +45,10 @@ function getEventData (req, res) {
}
function normalizedField (field) {
if (!field) {
return undefined;
}
return field.toString().trim().substr(0, MAX_LENGTH);
}