diff --git a/apps/renderer/src/modules/settings/action-card.tsx b/apps/renderer/src/modules/settings/action-card.tsx index 0d69e3c03b..5613fc16d9 100644 --- a/apps/renderer/src/modules/settings/action-card.tsx +++ b/apps/renderer/src/modules/settings/action-card.tsx @@ -431,7 +431,11 @@ export function ActionCard({ { - data.condition[orConditionIdx].splice(conditionIdx, 1) + if (data.condition[orConditionIdx].length === 1) { + data.condition.splice(orConditionIdx, 1) + } else { + data.condition[orConditionIdx].splice(conditionIdx, 1) + } onChange(data) }} />