From 3bdef6dc09c2db7e5d2c772f098edda9139f21ce Mon Sep 17 00:00:00 2001 From: Sabato Luca Guadagno Date: Thu, 26 Jan 2017 15:21:16 +0100 Subject: [PATCH] fixed undefined error log on sendMessage --- lib/reload.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/reload.js b/lib/reload.js index 87265a1..1c72646 100644 --- a/lib/reload.js +++ b/lib/reload.js @@ -39,7 +39,9 @@ module.exports = function reload (httpServer, expressApp, verboseLogging) { 'sendMessage': function (command) { if (conn) { conn.send(command, function (error) { - console.error(error) + if (error) { + console.error(error) + } }) } else { if (verboseLogging) {