Skip to content

Commit 7678399

Browse files
committed
Compatibility node ignores null messages #88
1 parent 421d5a2 commit 7678399

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

nodered.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1307,7 +1307,7 @@ class CompatibiltyNode extends Node {
13071307
this.#events[event].push(handler);
13081308

13091309
if ("input" === event)
1310-
this.#send ??= msg => super.send(msg);
1310+
this.#send ??= msg => {if (msg) return super.send(msg);};
13111311

13121312
return this;
13131313
}
@@ -1336,6 +1336,10 @@ class CompatibiltyNode extends Node {
13361336

13371337
return true;
13381338
}
1339+
send(msg) { // Node-RED alllows calling send with null message
1340+
if (msg)
1341+
return super.send(msg);
1342+
}
13391343

13401344
static type = "Node-RED Compatibility";
13411345
}

0 commit comments

Comments
 (0)