From 9ae7cde840495335641d647327f610ee56e065bb Mon Sep 17 00:00:00 2001 From: "J.D. Mallen" Date: Mon, 22 Aug 2022 21:02:28 -0400 Subject: [PATCH] Undo some formatting changes --- time/timeswitch/timeswitch.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/time/timeswitch/timeswitch.js b/time/timeswitch/timeswitch.js index b2fcdacf..3048f378 100644 --- a/time/timeswitch/timeswitch.js +++ b/time/timeswitch/timeswitch.js @@ -208,12 +208,8 @@ module.exports = function (RED) { }, 60000); // trigger every 60 secs this.on("close", function () { - if (tock) { - clearTimeout(tock); - } - if (tick) { - clearInterval(tick); - } + if (tock) { clearTimeout(tock); } + if (tick) { clearInterval(tick); } }); } @@ -221,9 +217,7 @@ module.exports = function (RED) { var node = RED.nodes.getNode(req.params.id); if (node != null) { try { - node.emit("input", { - payload: "reset" - }); + node.emit("input", { payload: "reset" }); res.sendStatus(200); } catch (err) { res.sendStatus(500);