From 6db282178153d5eb6d7816246b8c9e41e2aa2a22 Mon Sep 17 00:00:00 2001 From: Vladislav Syrochkin Date: Thu, 7 Aug 2025 13:02:52 +0500 Subject: [PATCH] refactor(react-flow): add existing nodes validate --- client/src/components/ReactFlowDrawer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/ReactFlowDrawer.tsx b/client/src/components/ReactFlowDrawer.tsx index 30a0269..b46e7da 100644 --- a/client/src/components/ReactFlowDrawer.tsx +++ b/client/src/components/ReactFlowDrawer.tsx @@ -190,7 +190,7 @@ export default function ReactFlowDrawer({ showDrawer }: ReactFlowDrawerProps) { const existingNodes = nodes .filter((node) => node.id !== selectedHandleId?.split("-")[0]) .filter((node) => { - if (!selectedHandleId) return false; + if (!selectedHandleId || node.type === "startNode") return false; const [sourceNodeId, sourceHandleId] = selectedHandleId.split("-"); return !edges.some( (edge) =>