fix(core): Ensure getNodeOutputs always returns an array (#19069)

This commit is contained in:
Csaba Tuncsik
2025-09-02 15:16:42 +02:00
committed by GitHub
parent 9569965a0b
commit 0f22f3be92
2 changed files with 9 additions and 11 deletions

View File

@@ -1047,12 +1047,15 @@ export function getNodeOutputs(
} else {
// Calculate the outputs dynamically
try {
outputs = (workflow.expression.getSimpleParameterValue(
const result = workflow.expression.getSimpleParameterValue(
node,
nodeTypeData.outputs,
'internal',
{},
) || []) as NodeConnectionType[];
);
outputs = Array.isArray(result)
? (result as Array<NodeConnectionType | INodeOutputConfiguration>)
: [];
} catch (e) {
console.warn('Could not calculate outputs dynamically for node: ', node.name);
}