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
1 changed files with 1 additions and 1 deletions

View File

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