[ANNOUNCE] Visual programming a function node with Blockly - Feedback request

re Bug above
That's been fixed :slight_smile:
But still not quite right

image

var outputPort;

function isValidOutput(outputNumber) {
  const AVAILABLE_OUTPUTS = 2;
  if (outputNumber > AVAILABLE_OUTPUTS) {
    node.error("Cannot send to output outputPort, since only 2 outputs available");
    return false;
  }
  else {
    return true;
  }
}


outputPort = 1;
if ((msg['payload']) == true) {
  outputPort = 2;
}
if(isValidOutput(outputPort)) {
  node.send([ null, null ]);
} 

I think it should end up issuing something like
node.send([null,msg]);