From 25ac6b8be56e57980f6cfa17be96a03ac35a7eeb Mon Sep 17 00:00:00 2001 From: Guilherme Sperb Date: Fri, 15 Jul 2016 14:03:28 -0300 Subject: [PATCH] Fixed: updateIssue method does not return a value to body var --- lib/redmine.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/redmine.js b/lib/redmine.js index c57efdf..7752da5 100644 --- a/lib/redmine.js +++ b/lib/redmine.js @@ -85,7 +85,10 @@ Redmine.prototype.request = function(method, path, params, callback) { body += chunk; }); res.on('end', function(e) { - var data = JSON.parse(body); + var data = ""; + if (body != "") { + data = JSON.parse(body); + } callback(null, data); callback = null; });