mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
🐛 Fix issue looking up values with multiple empty rows (#1701)
This commit is contained in:
parent
3904f7d568
commit
4d74e1fdea
|
@ -409,9 +409,18 @@ export class GoogleSheet {
|
||||||
inputData[keyRowIndex],
|
inputData[keyRowIndex],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// Standardise values array, if rows is [[]], map it to [['']] (Keep the columns into consideration)
|
||||||
|
for (let rowIndex = 0; rowIndex < inputData?.length; rowIndex++) {
|
||||||
|
if (inputData[rowIndex].length === 0) {
|
||||||
|
for (let i = 0; i < keys.length; i++) {
|
||||||
|
inputData[rowIndex][i] = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// Loop over all the lookup values and try to find a row to return
|
// Loop over all the lookup values and try to find a row to return
|
||||||
let rowIndex: number;
|
let rowIndex: number;
|
||||||
let returnColumnIndex: number;
|
let returnColumnIndex: number;
|
||||||
|
|
||||||
lookupLoop:
|
lookupLoop:
|
||||||
for (const lookupValue of lookupValues) {
|
for (const lookupValue of lookupValues) {
|
||||||
returnColumnIndex = keys.indexOf(lookupValue.lookupColumn);
|
returnColumnIndex = keys.indexOf(lookupValue.lookupColumn);
|
||||||
|
|
Loading…
Reference in a new issue