Minor optimisations

This commit is contained in:
2025-07-21 17:28:09 +02:00
parent b1719376cf
commit 57aafe3e0b
2 changed files with 8 additions and 5 deletions

View File

@@ -28,14 +28,12 @@ class nodeClass {
*/
_attachInputHandler() {
this.node.on('input', (msg, send, done) => {
let toggleUpdate = false;
switch (msg.topic) {
case "clock":
toggleUpdate = true;
this.source.updateState(msg.timestamp);
send([this.source.getEffluent, null, null]);
send([msg, null, null])
send([msg, null, null]);
break;
case "Fluent":
this.source.setInfluent = msg;
@@ -53,7 +51,6 @@ class nodeClass {
// Register this node as a child of the parent node
const childId = msg.payload;
const childObj = this.RED.nodes.getNode(childId);
console.log(childObj.source);
this.source.childRegistrationUtils.registerChild(childObj.source, msg.positionVsParent);
break;
default:
@@ -139,6 +136,7 @@ class nodeClass {
this.source = new_reactor; // protect from reassignment
this.node.source = this.source;
}
}
module.exports = nodeClass;