Skip to content

Commit 1735bc8

Browse files
committed
address greptile
1 parent bff4476 commit 1735bc8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

apps/sim/hooks/use-collaborative-workflow.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,12 @@ export function useCollaborativeWorkflow() {
226226
case EDGES_OPERATIONS.BATCH_ADD_EDGES: {
227227
const { edges } = payload
228228
if (Array.isArray(edges) && edges.length > 0) {
229-
const newEdges = filterNewEdges(edges, useWorkflowStore.getState().edges)
229+
const blocks = useWorkflowStore.getState().blocks
230+
const currentEdges = useWorkflowStore.getState().edges
231+
const validEdges = filterValidEdges(edges, blocks)
232+
const newEdges = filterNewEdges(validEdges, currentEdges)
230233
if (newEdges.length > 0) {
231-
useWorkflowStore.getState().batchAddEdges(newEdges)
234+
useWorkflowStore.getState().batchAddEdges(newEdges, { skipValidation: true })
232235
}
233236
}
234237
break

0 commit comments

Comments
 (0)