Skip to content

Commit 0d6b485

Browse files
committed
Fix
1 parent a9f271c commit 0d6b485

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/action-bar/action-bar.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,9 @@ export const ActionBar = memo(
123123
return sourceIncomingEdges.length === 0
124124
}
125125

126+
// Non-trigger blocks need a snapshot to exist (so upstream outputs are available)
126127
const dependenciesSatisfied =
127-
isTriggerBlock || incomingEdges.every((edge) => isSourceSatisfied(edge.source))
128+
isTriggerBlock || (snapshot && incomingEdges.every((edge) => isSourceSatisfied(edge.source)))
128129
const canRunFromBlock =
129130
dependenciesSatisfied && !isNoteBlock && !isInsideSubflow && !isExecuting
130131

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-workflow-execution.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1456,11 +1456,8 @@ export function useWorkflowExecution() {
14561456
return sourceIncomingEdges.length === 0
14571457
}
14581458

1459-
if (
1460-
!snapshot &&
1461-
!isTriggerBlock &&
1462-
!incomingEdges.every((edge) => isSourceSatisfied(edge.source))
1463-
) {
1459+
// Non-trigger blocks need a snapshot to exist (so upstream outputs are available)
1460+
if (!snapshot && !isTriggerBlock) {
14641461
logger.error('No execution snapshot available for run-from-block', { workflowId, blockId })
14651462
return
14661463
}

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1137,8 +1137,9 @@ const WorkflowContent = React.memo(() => {
11371137
return sourceIncomingEdges.length === 0
11381138
}
11391139

1140+
// Non-trigger blocks need a snapshot to exist (so upstream outputs are available)
11401141
const dependenciesSatisfied =
1141-
isTriggerBlock || incomingEdges.every((edge) => isSourceSatisfied(edge.source))
1142+
isTriggerBlock || (snapshot && incomingEdges.every((edge) => isSourceSatisfied(edge.source)))
11421143
const isNoteBlock = block.type === 'note'
11431144
const isInsideSubflow =
11441145
block.parentId && (block.parentType === 'loop' || block.parentType === 'parallel')

0 commit comments

Comments
 (0)