mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix(Google Sheets Node): Incorrect read of 0 and false (#6525)
This commit is contained in:
committed by
कारतोफ्फेलस्क्रिप्ट™
parent
d3d8522e8f
commit
b6202b5585
@@ -102,7 +102,9 @@ export function trimToFirstEmptyRow(data: SheetRangeData, includesRowNumber = tr
|
||||
export function removeEmptyRows(data: SheetRangeData, includesRowNumber = true) {
|
||||
const baseLength = includesRowNumber ? 1 : 0;
|
||||
const notEmptyRows = data.filter((row) =>
|
||||
row.slice(baseLength).some((cell) => cell || typeof cell === 'number'),
|
||||
row
|
||||
.slice(baseLength)
|
||||
.some((cell) => cell || typeof cell === 'number' || typeof cell === 'boolean'),
|
||||
);
|
||||
if (includesRowNumber) {
|
||||
notEmptyRows[0][0] = ROW_NUMBER;
|
||||
@@ -143,7 +145,9 @@ export function removeEmptyColumns(data: SheetRangeData) {
|
||||
returnData.push(column);
|
||||
}
|
||||
}
|
||||
return (returnData[0] || []).map((_, i) => returnData.map((row) => row[i] || ''));
|
||||
return (returnData[0] || []).map((_, i) =>
|
||||
returnData.map((row) => (row[i] === undefined ? '' : row[i])),
|
||||
);
|
||||
}
|
||||
|
||||
export function prepareSheetData(
|
||||
|
||||
Reference in New Issue
Block a user