mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
🐛 Fix issue looking up values with multiple empty rows (#1701)
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user