mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
add some istanbul ignore to trigger
This commit is contained in:
parent
d2b53ebba0
commit
813a5d2879
@ -105,6 +105,7 @@ module.exports = function(RED) {
|
|||||||
if (node.duration === 0) { node.topics[topic].tout = 0; }
|
if (node.duration === 0) { node.topics[topic].tout = 0; }
|
||||||
else if (node.loop === true) {
|
else if (node.loop === true) {
|
||||||
if (node.topics[topic].tout) { clearInterval(node.topics[topic].tout); }
|
if (node.topics[topic].tout) { clearInterval(node.topics[topic].tout); }
|
||||||
|
/* istanbul ignore else */
|
||||||
if (node.op1type !== "nul") {
|
if (node.op1type !== "nul") {
|
||||||
var msg2 = RED.util.cloneMessage(msg);
|
var msg2 = RED.util.cloneMessage(msg);
|
||||||
node.topics[topic].tout = setInterval(function() { node.send(RED.util.cloneMessage(msg2)); }, node.duration);
|
node.topics[topic].tout = setInterval(function() { node.send(RED.util.cloneMessage(msg2)); }, node.duration);
|
||||||
@ -127,6 +128,7 @@ module.exports = function(RED) {
|
|||||||
node.status({fill:"blue",shape:"dot",text:" "});
|
node.status({fill:"blue",shape:"dot",text:" "});
|
||||||
}
|
}
|
||||||
else if ((node.extend === "true" || node.extend === true) && (node.duration > 0)) {
|
else if ((node.extend === "true" || node.extend === true) && (node.duration > 0)) {
|
||||||
|
/* istanbul ignore else */
|
||||||
if (node.topics[topic].tout) { clearTimeout(node.topics[topic].tout); }
|
if (node.topics[topic].tout) { clearTimeout(node.topics[topic].tout); }
|
||||||
if (node.op2type === "payl") { node.topics[topic].m2 = RED.util.cloneMessage(msg.payload); }
|
if (node.op2type === "payl") { node.topics[topic].m2 = RED.util.cloneMessage(msg.payload); }
|
||||||
node.topics[topic].tout = setTimeout(function() {
|
node.topics[topic].tout = setTimeout(function() {
|
||||||
@ -149,6 +151,7 @@ module.exports = function(RED) {
|
|||||||
});
|
});
|
||||||
this.on("close", function() {
|
this.on("close", function() {
|
||||||
for (var t in node.topics) {
|
for (var t in node.topics) {
|
||||||
|
/* istanbul ignore else */
|
||||||
if (node.topics[t]) {
|
if (node.topics[t]) {
|
||||||
if (node.loop === true) { clearInterval(node.topics[t].tout); }
|
if (node.loop === true) { clearInterval(node.topics[t].tout); }
|
||||||
else { clearTimeout(node.topics[t].tout); }
|
else { clearTimeout(node.topics[t].tout); }
|
||||||
|
Loading…
Reference in New Issue
Block a user