mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
🐛 Fix Google Sheet to handle 0 correctly (#1937)
* 🐛 Fix Google Sheet to handle 0 correctly `if (condition) { statement }` will not be executed if the `condition` is `0` (number) so that appending 0 to Google Sheets results in an empty cell. Checking if the value is `null` or `undefined` is enough to guarantee that `toString` is callable. * 🐛 Add semicolon
This commit is contained in:
@@ -486,8 +486,9 @@ export class GoogleSheet {
|
||||
inputData.forEach((item) => {
|
||||
rowData = [];
|
||||
keyColumnOrder.forEach((key) => {
|
||||
if (item.hasOwnProperty(key) && item[key]) {
|
||||
rowData.push(item[key]!.toString());
|
||||
const data = item[key];
|
||||
if (item.hasOwnProperty(key) && data !== null && typeof data !== 'undefined') {
|
||||
rowData.push(data.toString());
|
||||
} else {
|
||||
rowData.push('');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user