Skip to content

Commit

Permalink
fix(action): remove key if value is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Kinplemelon authored and ysfscream committed Dec 18, 2024
1 parent 3bed7fc commit 8b7b19f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/hooks/Rule/useDataHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,8 @@ export const useActionDataHandler = (): {
;['value', 'isint', 'isbinary'].forEach((key) => {
if (/^(true|false)$/i.test(item[key])) {
ret[key] = /^true/i.test(item[key])
} else if (!item[key]) {
Reflect.deleteProperty(ret, key)
}
})
if (NUM_REG.test(item.value)) {
Expand Down

0 comments on commit 8b7b19f

Please sign in to comment.