Skip to content

Commit

Permalink
fix(core): Pass correct node reference to NodeExecuteFunctions.getLoa…
Browse files Browse the repository at this point in the history
…dOptionsFunctions (no-changelog)
  • Loading branch information
netroy committed Nov 22, 2023
1 parent 3c56404 commit 4ee9c86
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions packages/cli/src/services/dynamicNodeParameters.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export class DynamicNodeParametersService {
const connectionInputData: INodeExecutionData[] = [];
const runExecutionData: IRunExecutionData = { resultData: { runData: {} } };
const workflow = this.getWorkflow(nodeTypeAndVersion, currentNodeParameters, credentials);
const node = workflow.nodes[0];
const node = this.getFirstNode(workflow);

const routingNode = new RoutingNode(
workflow,
Expand Down Expand Up @@ -224,7 +224,15 @@ export class DynamicNodeParametersService {
additionalData: IWorkflowExecuteAdditionalData,
workflow: Workflow,
) {
const node = Object.values(workflow.nodes)[0];
return NodeExecuteFunctions.getLoadOptionsFunctions(workflow, node, path, additionalData);
return NodeExecuteFunctions.getLoadOptionsFunctions(
workflow,
this.getFirstNode(workflow),
path,
additionalData,
);
}

private getFirstNode(workflow: Workflow) {
return Object.values(workflow.nodes)[0];
}
}

0 comments on commit 4ee9c86

Please sign in to comment.