mirror of
https://github.com/Luchexx/wacrm.git
synced 2026-11-02 09:19:51 +00:00
fix(automations): remove spurious third output on condition steps
A Condition (If/Else) step rendered three add-step connectors: Yes, No, and a trailing linear "+". ConditionBranches already renders the Yes/No branch StepLists (each with its own AddButton), while StepRenderer also emitted a trailing AddButton after every step — including conditions. Skip the trailing AddButton when step_type === "condition", since a condition branches into Yes/No and has no linear continue path. Steps after a condition are added inside one of its branches. Fixes #256 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
f35ae4ef1c
commit
07e513690f
@ -927,9 +927,14 @@ function StepRenderer({
|
||||
)}
|
||||
</div>
|
||||
|
||||
<AddButton
|
||||
onPick={(t) => props.addStepAt(parentScope, index + 1, t)}
|
||||
/>
|
||||
{/* A condition branches into Yes/No (rendered above by
|
||||
ConditionBranches), so it has no linear "continue" path — adding
|
||||
the trailing connector here would produce a spurious third output. */}
|
||||
{!isCondition && (
|
||||
<AddButton
|
||||
onPick={(t) => props.addStepAt(parentScope, index + 1, t)}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user