From 0839b6f58ebfdb2e00b10e75335cd13897e57b65 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Tue, 24 Nov 2015 23:09:32 +0000 Subject: [PATCH] Debug node not handling null messages --- nodes/core/core/58-debug.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodes/core/core/58-debug.js b/nodes/core/core/58-debug.js index 59eb47e64..d7d13f067 100644 --- a/nodes/core/core/58-debug.js +++ b/nodes/core/core/58-debug.js @@ -84,7 +84,7 @@ module.exports = function(RED) { } else if (msg.msg instanceof Buffer) { msg.format = "buffer ["+msg.msg.length+"]"; msg.msg = msg.msg.toString('hex'); - } else if (typeof msg.msg === 'object') { + } else if (msg.msg && typeof msg.msg === 'object') { var seen = []; msg.format = msg.msg.constructor.name || "Object"; var isArray = util.isArray(msg.msg);