1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Short circuit the null message case.

This commit is contained in:
Mark Hindess 2014-07-09 08:01:52 +01:00
parent 74335990e3
commit 66459f1bd6

View File

@ -62,7 +62,7 @@ Node.prototype.close = function() {
Node.prototype.send = function(msg) { Node.prototype.send = function(msg) {
// instanceof doesn't work for some reason here // instanceof doesn't work for some reason here
if (msg == null) { if (msg == null) {
msg = []; return;
} else if (!util.isArray(msg)) { } else if (!util.isArray(msg)) {
msg = [msg]; msg = [msg];
} }