fix(edges): use empty string instead of null when source-/target-handle is not present

This commit is contained in:
Braks
2022-04-04 21:42:48 +02:00
parent c955d19263
commit 9b940142a7
+1 -1
View File
@@ -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(