summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSheogorath2018-09-28 00:17:34 +0200
committerSheogorath2018-09-28 00:17:43 +0200
commitc03b42d5d4f804d0cdbaf00c5eb426ca95f2a1cf (patch)
treeef59073911a8ffbfccead7d152e55c8f050b47be
parentffc28e06f3b4b133ff1c7d084a9c970609992371 (diff)
Fix little bug in length limit
Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
Diffstat (limited to '')
-rw-r--r--lib/response.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/response.js b/lib/response.js
index 8133b1a0..4df036b7 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, '')