mirror of https://github.com/node-red/node-red.git
Partial fix for Issue #17
This commit is contained in:
parent
88eb2cddc2
commit
b0e9dbb929
|
@ -45,7 +45,14 @@ DebugNode.send = function(msg) {
|
|||
if (msg.msg instanceof Error) {
|
||||
msg.msg = msg.msg.toString();
|
||||
} else if (typeof msg.msg === 'object') {
|
||||
try {
|
||||
msg.msg = "(Object) "+JSON.stringify(msg.msg,null,1);
|
||||
}
|
||||
catch (err) {
|
||||
console.log(msg.msg);
|
||||
console.log(err);
|
||||
msg.msg = "[Error] Can't stringify object with circular reference - see console log.";
|
||||
}
|
||||
} else if (msg.msg == 0) msg.msg = "0";
|
||||
|
||||
for (var i in DebugNode.activeConnections) {
|
||||
|
|
Loading…
Reference in New Issue