1
0
Fork 0
mirror of synced 2024-07-01 04:21:06 +12:00

Merge pull request #8088 from shumpeiKishi/bug/automation-update-row-boolean-false-doesnt-work

Automation: Update row to make a boolean Value "FALSE" does not work #8030
This commit is contained in:
melohagan 2022-10-03 10:19:54 +01:00 committed by GitHub
commit d50d456e0d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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