From 8b7b19fcabd8e6d52c4ed3d3491ddd644142987b Mon Sep 17 00:00:00 2001 From: Kinplemelon Date: Wed, 18 Dec 2024 17:15:49 +0800 Subject: [PATCH] fix(action): remove key if value is empty --- src/hooks/Rule/useDataHandler.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hooks/Rule/useDataHandler.ts b/src/hooks/Rule/useDataHandler.ts index 39b2a587f..56ee3299a 100644 --- a/src/hooks/Rule/useDataHandler.ts +++ b/src/hooks/Rule/useDataHandler.ts @@ -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)) {