Adding a validation check for undefined

This commit is contained in:
Shumpei Kishi 2022-10-03 17:34:06 +09:00
parent 8aee6c95d8
commit 2f563f108a
1 changed files with 2 additions and 2 deletions

View File

@ -66,9 +66,9 @@ exports.run = async function ({ inputs, appId, emitter }) {
} }
const tableId = inputs.row.tableId 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)) { 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] delete inputs.row[propKey]
} }
} }