mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
fix(core): Fix resolving of $fromAI expression via evaluateExpression (#11397)
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
@@ -2856,6 +2856,8 @@ async function getInputConnectionData(
|
|||||||
connectedNode.typeVersion,
|
connectedNode.typeVersion,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// TODO: create a new context object here based on the type of `connectedNode`, and avoid using `Object.assign` on context objects
|
||||||
|
// https://linear.app/n8n/issue/CAT-269
|
||||||
const context = Object.assign({}, this);
|
const context = Object.assign({}, this);
|
||||||
|
|
||||||
context.getNodeParameter = (
|
context.getNodeParameter = (
|
||||||
@@ -3758,14 +3760,16 @@ export function getExecuteFunctions(
|
|||||||
continueOnFail: () => {
|
continueOnFail: () => {
|
||||||
return continueOnFail(node);
|
return continueOnFail(node);
|
||||||
},
|
},
|
||||||
evaluateExpression: (expression: string, itemIndex: number) => {
|
evaluateExpression(expression: string, itemIndex: number) {
|
||||||
return workflow.expression.resolveSimpleParameterValue(
|
return workflow.expression.resolveSimpleParameterValue(
|
||||||
`=${expression}`,
|
`=${expression}`,
|
||||||
{},
|
{},
|
||||||
runExecutionData,
|
runExecutionData,
|
||||||
runIndex,
|
runIndex,
|
||||||
itemIndex,
|
itemIndex,
|
||||||
node.name,
|
// TODO: revert this back to `node.name` when we stop using `IExecuteFunctions` as the context object in AI nodes.
|
||||||
|
// https://linear.app/n8n/issue/CAT-269
|
||||||
|
this.getNode().name,
|
||||||
connectionInputData,
|
connectionInputData,
|
||||||
mode,
|
mode,
|
||||||
getAdditionalKeys(additionalData, mode, runExecutionData),
|
getAdditionalKeys(additionalData, mode, runExecutionData),
|
||||||
|
|||||||
Reference in New Issue
Block a user