mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
🐛 Fix issue that expressions did not resolve for displayOptions
This commit is contained in:
@@ -2,9 +2,11 @@ import { PLACEHOLDER_EMPTY_WORKFLOW_ID } from '@/constants';
|
||||
|
||||
import {
|
||||
IConnections,
|
||||
IDataObject,
|
||||
INode,
|
||||
INodeExecutionData,
|
||||
INodeIssues,
|
||||
INodeParameters,
|
||||
INodeType,
|
||||
INodeTypes,
|
||||
INodeTypeData,
|
||||
@@ -336,7 +338,7 @@ export const workflowHelpers = mixins(
|
||||
},
|
||||
|
||||
// Executes the given expression and returns its value
|
||||
resolveExpression (expression: string) {
|
||||
resolveExpression (expression: string, siblingParameters: INodeParameters) {
|
||||
const inputIndex = 0;
|
||||
const itemIndex = 0;
|
||||
const runIndex = 0;
|
||||
@@ -362,7 +364,16 @@ export const workflowHelpers = mixins(
|
||||
connectionInputData = [];
|
||||
}
|
||||
|
||||
return workflow.expression.getParameterValue(expression, runExecutionData, runIndex, itemIndex, activeNode.name, connectionInputData, 'manual', true);
|
||||
const parameters = {
|
||||
'__xxxxxxx__': expression,
|
||||
...siblingParameters,
|
||||
};
|
||||
const returnData = workflow.expression.getParameterValue(parameters, runExecutionData, runIndex, itemIndex, activeNode.name, connectionInputData, 'manual', false) as IDataObject;
|
||||
|
||||
if (typeof returnData['__xxxxxxx__'] === 'object') {
|
||||
return workflow.expression.convertObjectValueToString(returnData['__xxxxxxx__'] as object);
|
||||
}
|
||||
return returnData['__xxxxxxx__'];
|
||||
},
|
||||
|
||||
// Saves the currently loaded workflow to the database.
|
||||
|
||||
Reference in New Issue
Block a user