diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/view.js b/packages/node_modules/@node-red/editor-client/src/js/ui/view.js index 999c98587..10d47027d 100755 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/view.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/view.js @@ -2414,11 +2414,16 @@ RED.view = (function() { // This is not a virtualLink - which means it started // on a regular node port. Need to ensure the this isn't // connecting to a link node virual port. + // + // PORT_TYPE_OUTPUT=0 + // PORT_TYPE_INPUT=1 if (!( (d.type === "link out" && portType === PORT_TYPE_OUTPUT) || (d.type === "link in" && portType === PORT_TYPE_INPUT) || - (portType === PORT_TYPE_OUTPUT && mouseup_node.outputs === 0) || - (portType === PORT_TYPE_INPUT && mouseup_node.inputs === 0) + (portType === PORT_TYPE_OUTPUT && mouseup_node.type !== "subflow" && mouseup_node.outputs === 0) || + (portType === PORT_TYPE_INPUT && mouseup_node.type !== "subflow" && mouseup_node.inputs === 0) || + (drag_line.portType === PORT_TYPE_INPUT && mouseup_node.type === "subflow" && (mouseup_node.direction === "status" || mouseup_node.direction === "out")) || + (drag_line.portType === PORT_TYPE_OUTPUT && mouseup_node.type === "subflow" && mouseup_node.direction === "in") )) { var existingLink = RED.nodes.filterLinks({source:src,target:dst,sourcePort: src_port}).length !== 0; if (!existingLink) {