Skip to content

Commit 60a4882

Browse files
committed
fix(workflow): keep the editor selection when a block add is refused
1 parent 745ddf6 commit 60a4882

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -971,13 +971,14 @@ const WorkflowContent = React.memo(
971971
)
972972
}
973973

974-
collaborativeBatchAddBlocks(
974+
const added = collaborativeBatchAddBlocks(
975975
[block],
976976
autoConnectEdge ? [autoConnectEdge] : [],
977977
{},
978978
{},
979979
subBlockValues
980980
)
981+
if (!added) return
981982
usePanelEditorStore.getState().setCurrentBlockId(id)
982983
if (type === 'note') usePanelStore.getState().setIsMobilePanelOpen(false)
983984
},

0 commit comments

Comments
 (0)