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

MQTT Client - missing null check

This commit is contained in:
Nick O'Leary 2014-04-21 21:14:03 +01:00
parent 0b7fa1ab5c
commit c20128b80f

View File

@ -74,7 +74,7 @@ module.exports = {
client.once(a,b); client.once(a,b);
}, },
connect: function() { connect: function() {
if (!client.isConnected() && !connecting) { if (client && !client.isConnected() && !connecting) {
connecting = true; connecting = true;
client.connect(options); client.connect(options);
} }