From 9b940142a74b9777b0717a4f1f39a1ee3b06c21a Mon Sep 17 00:00:00 2001 From: Braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Mon, 28 Mar 2022 19:25:11 +0200 Subject: [PATCH] fix(edges): use empty string instead of null when source-/target-handle is not present --- src/utils/graph.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/graph.ts b/src/utils/graph.ts index 9ce6bb21..01aa7f68 100644 --- a/src/utils/graph.ts +++ b/src/utils/graph.ts @@ -127,7 +127,7 @@ export const getOutgoers = (node: GraphNode, elements: Elements) => getConnected export const getIncomers = (node: GraphNode, elements: Elements) => getConnectedElements(node, elements, 'source') export const getEdgeId = ({ source, sourceHandle, target, targetHandle }: Connection) => - `vueflow__edge-${source}${sourceHandle}-${target}${targetHandle}` + `vueflow__edge-${source}${sourceHandle ?? ''}-${target}${targetHandle ?? ''}` export const connectionExists = (edge: Edge, elements: Elements) => elements.some(