feat(editor): Support relative dependent parameters for collection NodeProperties (#18916)

This commit is contained in:
Charlie Kolb
2025-08-28 16:34:23 +02:00
committed by GitHub
parent 44b686e944
commit a15391acc9
6 changed files with 65 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
import get from 'lodash/get';
import { ApplicationError, Workflow } from 'n8n-workflow';
import { ApplicationError, resolveRelativePath, Workflow } from 'n8n-workflow';
import type {
INodeParameterResourceLocator,
IWorkflowExecuteAdditionalData,
@@ -61,9 +61,7 @@ export class LocalLoadOptionsContext implements ILocalLoadOptionsFunctions {
getCurrentNodeParameter(parameterPath: string): NodeParameterValueType | object | undefined {
const nodeParameters = this.additionalData.currentNodeParameters;
if (parameterPath.startsWith('&')) {
parameterPath = `${this.path.split('.').slice(1, -1).join('.')}.${parameterPath.slice(1)}`;
}
parameterPath = resolveRelativePath(this.path, parameterPath);
return get(nodeParameters, parameterPath);
}