From fbf60199d95d2448f9f34d0175da316fc18a80b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taha=20S=C3=B6nmez?= <35905778+tahasonmez@users.noreply.github.com> Date: Mon, 30 May 2022 14:37:34 +0300 Subject: [PATCH] fix(Google Sheet Node): Fix issue with null values and "Use Header Names as JSON Paths" option (#3395) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fixed Google Sheet 'Use Header Names as JSON Paths' issue when input data contains null values. https://community.n8n.io/t/error-cannot-read-properties-of-null-reading-tostring/14385/2 * :zap: Update URLs to n8n.io API (#3391) * fix(core): Fix migrations on non-public Postgres schema (#3356) * :bug: Fix UM migration * :zap: Account for schema in `search_path` * :fire: Remove unneeded schema refs * :test_tube: Account for alt schema in DB testing * :zap: Add schema to `IncreaseTypeVarcharLimit` * :zap: Set `search_path` in every migration * :zap: Set `search_path` in down migrations * refactor(core): Improve error message * feat(RabbitMQ Trigger Node): Make message acknowledgement and parallel processing configurable (#3385) * feat(RabbitMQ Trigger Node): Make message acknowledgement and concurrent processing configurable * :zap: Make sure that messages do not get executed multiple times * :shirt: Fix lint issue * :bug: Fix issue that for manual executions in "own" mode messages got know acknowledged * :zap: Increment count now that console.log got removed * :zap: Improvements * :zap: Fix default value * :zap: Improve display name * fix(Gmail Node): Fix sending attachments when filesystem mode is used (#3396) * :zap: Minor improvement Co-authored-by: Taha Sönmez Co-authored-by: Ben Hesseldieck <1849459+BHesseldieck@users.noreply.github.com> Co-authored-by: Iván Ovejero Co-authored-by: Jan Oberhauser Co-authored-by: Jan Oberhauser Co-authored-by: Michael Kret <88898367+michael-radency@users.noreply.github.com> --- packages/nodes-base/nodes/Google/Sheet/GoogleSheet.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/nodes-base/nodes/Google/Sheet/GoogleSheet.ts b/packages/nodes-base/nodes/Google/Sheet/GoogleSheet.ts index 1d4d29211f..2f82f2e6e9 100644 --- a/packages/nodes-base/nodes/Google/Sheet/GoogleSheet.ts +++ b/packages/nodes-base/nodes/Google/Sheet/GoogleSheet.ts @@ -503,8 +503,9 @@ export class GoogleSheet { inputData.forEach((item) => { rowData = []; keyColumnOrder.forEach((key) => { - if (usePathForKeyRow && (get(item, key) !== undefined)) { //match by key path - rowData.push(get(item, key)!.toString()); + const value = get(item, key) as string; + if (usePathForKeyRow && value !== undefined && value !== null) { //match by key path + rowData.push(value!.toString()); } else if (!usePathForKeyRow && item.hasOwnProperty(key) && item[key] !== null && item[key] !== undefined) { //match by exact key name rowData.push(item[key]!.toString()); } else {