From c03b42d5d4f804d0cdbaf00c5eb426ca95f2a1cf Mon Sep 17 00:00:00 2001 From: Sheogorath Date: Fri, 28 Sep 2018 00:17:34 +0200 Subject: [PATCH] Fix little bug in length limit Signed-off-by: Sheogorath --- lib/response.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/response.js b/lib/response.js index 8133b1a..4df036b 100644 --- a/lib/response.js +++ b/lib/response.js @@ -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, '')