mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-21 02:56:40 -08:00
🐛 Fix variable selector bug with arrays in arrays
This commit is contained in:
parent
f31049d454
commit
5a0d1bf993
|
@ -171,14 +171,16 @@ export default mixins(
|
|||
return returnData;
|
||||
} else if (Array.isArray(inputData)) {
|
||||
let newPropertyName = propertyName;
|
||||
let newParentPath = parentPath;
|
||||
if (propertyIndex !== undefined) {
|
||||
newPropertyName += `[${propertyIndex}]`;
|
||||
newParentPath += `["${propertyName}"]`;
|
||||
newPropertyName = propertyIndex.toString();
|
||||
}
|
||||
|
||||
const arrayData: IVariableSelectorOption[] = [];
|
||||
|
||||
for (let i = 0; i < inputData.length; i++) {
|
||||
arrayData.push.apply(arrayData, this.jsonDataToFilterOption(inputData[i], parentPath, newPropertyName, filterText, i, `[Item: ${i}]`, skipKey));
|
||||
arrayData.push.apply(arrayData, this.jsonDataToFilterOption(inputData[i], newParentPath, newPropertyName, filterText, i, `[Item: ${i}]`, skipKey));
|
||||
}
|
||||
|
||||
returnData.push(
|
||||
|
|
Loading…
Reference in a new issue