mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-28 08:18:09 -05:00
Fix trigger clear snapshot
This commit is contained in:
@@ -1460,8 +1460,9 @@ export function useWorkflowExecution() {
|
||||
return
|
||||
}
|
||||
|
||||
// For trigger blocks with no snapshot, create an empty one
|
||||
const effectiveSnapshot: SerializableExecutionState = snapshot || {
|
||||
// For trigger blocks, always use empty snapshot to prevent stale data from different
|
||||
// execution paths from being resolved. For non-trigger blocks, use the existing snapshot.
|
||||
const emptySnapshot: SerializableExecutionState = {
|
||||
blockStates: {},
|
||||
executedBlocks: [],
|
||||
blockLogs: [],
|
||||
@@ -1469,6 +1470,9 @@ export function useWorkflowExecution() {
|
||||
completedLoops: [],
|
||||
activeExecutionPath: [],
|
||||
}
|
||||
const effectiveSnapshot: SerializableExecutionState = isTriggerBlock
|
||||
? emptySnapshot
|
||||
: snapshot || emptySnapshot
|
||||
|
||||
// Extract mock payload for trigger blocks
|
||||
let workflowInput: any
|
||||
|
||||
Reference in New Issue
Block a user