mirror of
https://github.com/node-red/node-red.git
synced 2025-12-27 15:34:26 +01:00
Handle subflow virtual port nodes when generating quick-add context
This commit is contained in:
@@ -1627,7 +1627,9 @@ RED.nodes = (function() {
|
||||
if (node.type === "group") {
|
||||
nns = nns.concat(createExportableNodeSet(node.nodes, { exportedIds, exportedSubflows, exportedConfigNodes }));
|
||||
}
|
||||
} else {
|
||||
} else if (!node.direction) {
|
||||
// node.direction indicates its a virtual subflow node (input/output/status) that cannot be
|
||||
// exported so should be skipped over.
|
||||
var convertedSubflow = convertSubflow(node, { credentials: false });
|
||||
nns.push(convertedSubflow);
|
||||
}
|
||||
|
||||
@@ -1418,7 +1418,12 @@ RED.view = (function() {
|
||||
if (quickAddLink?.virtualLink) {
|
||||
context.virtualLink = true;
|
||||
}
|
||||
context.flow = RED.nodes.createExportableNodeSet(RED.nodes.getAllFlowNodes(quickAddLink.node))
|
||||
if (quickAddLink.node?.type === 'subflow') {
|
||||
// This is a subflow 'virtual' port node.
|
||||
context.flow = []
|
||||
} else {
|
||||
context.flow = RED.nodes.createExportableNodeSet(RED.nodes.getAllFlowNodes(quickAddLink.node))
|
||||
}
|
||||
}
|
||||
|
||||
// console.log(context)
|
||||
|
||||
Reference in New Issue
Block a user