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

injecting blank payload stops twitter stream

This commit is contained in:
Dave Conway-Jones 2016-09-27 18:03:54 +01:00
parent 4c5b75f30a
commit 2c49832bda

View File

@ -246,9 +246,14 @@ module.exports = function(RED) {
node.on("input", function(msg) { node.on("input", function(msg) {
if (this.tags === '') { if (this.tags === '') {
if (this.stream) { this.stream.destroy(); } if (this.stream) { this.stream.destroy(); }
st = { track: [msg.payload] }; if (msg.payload !== "") {
setupStream(); st = { track: [msg.payload] };
node.status({fill:"green", shape:"dot", text:msg.payload}); setupStream();
node.status({fill:"green", shape:"dot", text:msg.payload});
}
else {
node.status({fill:"yellow", shape:"ring", text:RED._("twitter.warn.waiting")});
}
} }
//We shouldn't get into this state, but just incase, check for it //We shouldn't get into this state, but just incase, check for it
else { else {