Hi
I have a larger function block that wasn’t working with 2 outputs.
I made it as short as I could and still produce my problem.
[{"id":"4b2b5008.c221f","type":"function","z":"b7656499.b2541","name":"Msg Test","func":"var OneMsg = msg; // The msg for setting light options\nvar TwoMsg = msg; // The msg for setting manual override state\nOneMsg.debug = \"One\";\nTwoMsg.debug = \"Two\";\n\n\n\nreturn [OneMsg, TwoMsg];\n\n\n\n","outputs":2,"noerr":0,"x":940,"y":4260,"wires":[["58016c40.285fa4"],["6abf617d.ab492"]]},{"id":"58016c40.285fa4","type":"debug","z":"b7656499.b2541","name":"Debug OneMsg","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1120,"y":4240,"wires":[]},{"id":"8c35633e.b277b","type":"inject","z":"b7656499.b2541","name":"Input","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":810,"y":4260,"wires":[["4b2b5008.c221f"]]},{"id":"6abf617d.ab492","type":"debug","z":"b7656499.b2541","name":"Debug TwoMsg","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1120,"y":4280,"wires":[]}]
I input a payload, put it into 2 variables and add a msg.debug with a value to each output variable.
Expecting each output to be different, they are however the same.
Javascript as follow:
var OneMsg = msg; // The msg for setting light options
var TwoMsg = msg; // The msg for setting manual override state
OneMsg.debug = "One";
TwoMsg.debug = "Two";
return [OneMsg, TwoMsg];
Producing