phoddie / node-red-mcu

Node-RED for microcontrollers
120 stars 18 forks source link

Exception on node.send(null) from contrib node. #88

Closed colinl closed 1 year ago

colinl commented 1 year ago

If a contrib node tries to send a null message then an exception is generated, such as /home/user/Projects/node-red-mcu/nodered.js (290) # Break: Node.prototype.send: cannot coerce null to object!

This is a not unusual strategy in nodes when it is desired to send nothing. Well I use it at least.

phoddie commented 1 year ago

I didn't imagine someone would send a null message. ;) I've updated the Compatibility node to allow that, both for node.send() and the send argument passed to the input handler.

colinl commented 1 year ago

Working perfectly for me now. Thanks.