We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d4aefa commit 0258a1bCopy full SHA for 0258a1b
apps/sim/stores/workflows/registry/store.ts
@@ -426,8 +426,12 @@ export const useWorkflowRegistry = create<WorkflowRegistry>()(
426
setActiveWorkflow: async (id: string) => {
427
const { workflows, activeWorkflowId } = get()
428
429
- if (activeWorkflowId === id) {
430
- logger.info(`Already active workflow ${id}, skipping switch`)
+ // Check if workflow is already active AND has data loaded
+ const workflowStoreState = useWorkflowStore.getState()
431
+ const hasWorkflowData = Object.keys(workflowStoreState.blocks).length > 0
432
+
433
+ if (activeWorkflowId === id && hasWorkflowData) {
434
+ logger.info(`Already active workflow ${id} with data loaded, skipping switch`)
435
return
436
}
437
0 commit comments