mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
⚡ Fix issue with option parameters that are named the same #1808
This commit is contained in:
parent
440971673c
commit
d3c59a6fe3
|
@ -68,7 +68,7 @@ export default mixins(
|
||||||
for (const name of this.propertyNames) {
|
for (const name of this.propertyNames) {
|
||||||
tempProperties = this.getOptionProperties(name);
|
tempProperties = this.getOptionProperties(name);
|
||||||
if (tempProperties !== undefined) {
|
if (tempProperties !== undefined) {
|
||||||
returnProperties.push(tempProperties);
|
returnProperties.push(...tempProperties);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return returnProperties;
|
return returnProperties;
|
||||||
|
@ -104,14 +104,15 @@ export default mixins(
|
||||||
|
|
||||||
return this.parameter.typeOptions[argumentName];
|
return this.parameter.typeOptions[argumentName];
|
||||||
},
|
},
|
||||||
getOptionProperties (optionName: string): INodeProperties | undefined {
|
getOptionProperties (optionName: string): INodeProperties[] {
|
||||||
|
const properties: INodeProperties[] = [];
|
||||||
for (const option of this.parameter.options) {
|
for (const option of this.parameter.options) {
|
||||||
if (option.name === optionName) {
|
if (option.name === optionName) {
|
||||||
return option;
|
properties.push(option);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return undefined;
|
return properties;
|
||||||
},
|
},
|
||||||
displayNodeParameter (parameter: INodeProperties) {
|
displayNodeParameter (parameter: INodeProperties) {
|
||||||
if (parameter.displayOptions === undefined) {
|
if (parameter.displayOptions === undefined) {
|
||||||
|
@ -121,10 +122,12 @@ export default mixins(
|
||||||
return this.displayParameter(this.nodeValues, parameter, this.path);
|
return this.displayParameter(this.nodeValues, parameter, this.path);
|
||||||
},
|
},
|
||||||
optionSelected (optionName: string) {
|
optionSelected (optionName: string) {
|
||||||
const option = this.getOptionProperties(optionName);
|
const options = this.getOptionProperties(optionName);
|
||||||
if (option === undefined) {
|
if (options.length === 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const option = options[0];
|
||||||
const name = `${this.path}.${option.name}`;
|
const name = `${this.path}.${option.name}`;
|
||||||
|
|
||||||
let parameterData;
|
let parameterData;
|
||||||
|
|
Loading…
Reference in a new issue