File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
apps/sim/executor/handlers/condition Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -178,10 +178,20 @@ export class ConditionBlockHandler implements BlockHandler {
178178 evalContext
179179 )
180180
181- const connection = this . findConnectionForCondition ( outgoingConnections , condition . id )
182-
183- if ( connection && conditionMet ) {
184- return { selectedConnection : connection , selectedCondition : condition }
181+ if ( conditionMet ) {
182+ const connection = this . findConnectionForCondition ( outgoingConnections , condition . id )
183+ if ( connection ) {
184+ return { selectedConnection : connection , selectedCondition : condition }
185+ }
186+ // Condition is true but has no outgoing edge - branch ends gracefully
187+ logger . info (
188+ `Condition "${ condition . title } " is true but has no outgoing edge - branch ending` ,
189+ {
190+ blockId : block . id ,
191+ conditionId : condition . id ,
192+ }
193+ )
194+ return { selectedConnection : null , selectedCondition : null }
185195 }
186196 } catch ( error : any ) {
187197 logger . error ( `Failed to evaluate condition "${ condition . title } ": ${ error . message } ` )
You can’t perform that action at this time.
0 commit comments