mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
fix(editor): Fix run index input for RunData view in sub-nodes (#11538)
This commit is contained in:
@@ -154,6 +154,29 @@ const parentNode = computed(() => {
|
||||
});
|
||||
|
||||
const inputNodeName = computed<string | undefined>(() => {
|
||||
const nodeOutputs =
|
||||
activeNode.value && activeNodeType.value
|
||||
? NodeHelpers.getNodeOutputs(props.workflowObject, activeNode.value, activeNodeType.value)
|
||||
: [];
|
||||
|
||||
const nonMainOutputs = nodeOutputs.filter((output) => {
|
||||
if (typeof output === 'string') return output !== NodeConnectionType.Main;
|
||||
|
||||
return output.type !== NodeConnectionType.Main;
|
||||
});
|
||||
|
||||
const isSubNode = nonMainOutputs.length > 0;
|
||||
|
||||
if (isSubNode && activeNode.value) {
|
||||
// For sub-nodes, we need to get their connected output node to determine the input
|
||||
// because sub-nodes use specialized outputs (e.g. NodeConnectionType.AiTool)
|
||||
// instead of the standard Main output type
|
||||
const connectedOutputNode = props.workflowObject.getChildNodes(
|
||||
activeNode.value.name,
|
||||
'ALL_NON_MAIN',
|
||||
)?.[0];
|
||||
return connectedOutputNode;
|
||||
}
|
||||
return selectedInput.value || parentNode.value;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user