From fb0a1468f7019d2287dcdd50436249ca125032c6 Mon Sep 17 00:00:00 2001 From: Shumpei Kishi Date: Mon, 3 Oct 2022 17:34:06 +0900 Subject: [PATCH] Adding a validation check for undefined --- packages/server/src/automations/steps/updateRow.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/server/src/automations/steps/updateRow.js b/packages/server/src/automations/steps/updateRow.js index 275095c98f..5a2c158c5f 100644 --- a/packages/server/src/automations/steps/updateRow.js +++ b/packages/server/src/automations/steps/updateRow.js @@ -66,9 +66,9 @@ exports.run = async function ({ inputs, appId, emitter }) { } const tableId = inputs.row.tableId - // clear any null or empty string properties so that they aren't updated + // clear any undefined, null or empty string properties so that they aren't updated for (let propKey of Object.keys(inputs.row)) { - if (inputs.row[propKey] === null || inputs.row[propKey] === "") { + if (inputs.row[propKey] == null || inputs.row[propKey] === "") { delete inputs.row[propKey] } }