diff --git a/packages/desktop-client/src/components/mobile/rules/MobileRulesPage.tsx b/packages/desktop-client/src/components/mobile/rules/MobileRulesPage.tsx index fdf8df0c5b..df244ab173 100644 --- a/packages/desktop-client/src/components/mobile/rules/MobileRulesPage.tsx +++ b/packages/desktop-client/src/components/mobile/rules/MobileRulesPage.tsx @@ -112,7 +112,7 @@ export function MobileRulesPage() { const { mutate: deleteRule } = useDeleteRuleMutation(); const handleRuleDelete = useCallback( - async (rule: RuleEntity) => { + (rule: RuleEntity) => { deleteRule( { id: rule.id }, { diff --git a/packages/desktop-client/src/components/rules/RuleEditor.tsx b/packages/desktop-client/src/components/rules/RuleEditor.tsx index 60c854da8c..dede070d32 100644 --- a/packages/desktop-client/src/components/rules/RuleEditor.tsx +++ b/packages/desktop-client/src/components/rules/RuleEditor.tsx @@ -1016,9 +1016,7 @@ export function RuleEditor({ return parsedActions.reduce( (acc, action) => { const splitIndex = - 'options' in action && 'splitIndex' in action.options - ? (action.options.splitIndex ?? 0) - : 0; + 'options' in action ? (action.options?.splitIndex ?? 0) : 0; acc[splitIndex] = acc[splitIndex] ?? { id: uuid(), actions: [] }; acc[splitIndex].actions.push({ ...action, inputKey: uuid() }); return acc;