diff --git a/io/mqlight/mqlight.js b/io/mqlight/mqlight.js index 2e3db924..d917723e 100644 --- a/io/mqlight/mqlight.js +++ b/io/mqlight/mqlight.js @@ -112,13 +112,13 @@ module.exports = function(RED) { var topic = node.topic; if (topic === "") { if (msg.topic) { - node.topic = msg.topic; + topic = msg.topic; } else { node.warn("No topic set in MQ Light out node"); return; } } - sendClient.send(node.topic, msg.payload, function(err) { + sendClient.send(topic, msg.payload, function(err) { if (err) { node.error(err,msg); } diff --git a/io/mqlight/package.json b/io/mqlight/package.json index 26f6e3e2..02f89477 100644 --- a/io/mqlight/package.json +++ b/io/mqlight/package.json @@ -1,6 +1,6 @@ { "name" : "node-red-node-mqlight", - "version" : "0.0.9", + "version" : "0.0.10", "description" : "A Node-RED node to send and receive message from IBM MQ Light", "dependencies" : { "mqlight" : "1.0.x"