fix(core): Fix $items().length in Execute Once mode (#4755)

* 🐛 Fix `$items.length` in Execute Once mode

* 🔥 Remove logging
This commit is contained in:
Iván Ovejero 2022-11-29 17:30:39 +01:00 committed by GitHub
parent b319671fd0
commit 3d67df490c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1138,21 +1138,14 @@ export class WorkflowDataProxy {
return dataProxy.getDataProxy();
},
$items: (nodeName?: string, outputIndex?: number, runIndex?: number) => {
let executionData: INodeExecutionData[];
if (nodeName === undefined) {
executionData = that.connectionInputData;
} else {
nodeName = (that.prevNodeGetter() as { name: string }).name;
}
outputIndex = outputIndex || 0;
runIndex = runIndex === undefined ? -1 : runIndex;
executionData = that.getNodeExecutionData(nodeName, false, outputIndex, runIndex);
}
if (that.workflow.getNode(that.activeNodeName)?.executeOnce) {
executionData = that.connectionInputData.slice(0, 1);
}
return executionData;
return that.getNodeExecutionData(nodeName, false, outputIndex, runIndex);
},
$json: {}, // Placeholder
$node: this.nodeGetter(),