Fix little bug in length limit

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
This commit is contained in:
Sheogorath 2018-09-28 00:17:34 +02:00
parent ffc28e06f3
commit c03b42d5d4
No known key found for this signature in database
GPG key ID: 1F05CC3635CDDFFD

View file

@ -151,7 +151,7 @@ function newNote (req, res, next) {
var body = ''
if (req.body && req.body.length > config.documentMaxLength) {
return response.errorTooLong(res)
} else {
} else if (req.body) {
body = req.body
}
body = body.replace(/[\r]/g, '')