Skip to content

Commit

Permalink
chore(graph-utils): rename elements to edges
Browse files Browse the repository at this point in the history
  • Loading branch information
chrtze committed Oct 21, 2021
1 parent 8d840b5 commit b008c7b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/utils/graph.ts
Expand Up @@ -61,10 +61,9 @@ export const getMarkerId = (marker: EdgeMarkerType | undefined): string => {
.join('&');
};

const connectionExists = (edge: Edge, elements: Edge[]) => {
return elements.some(
const connectionExists = (edge: Edge, edges: Edge[]) => {
return edges.some(
(el) =>
isEdge(el) &&
el.source === edge.source &&
el.target === edge.target &&
(el.sourceHandle === edge.sourceHandle || (!el.sourceHandle && !edge.sourceHandle)) &&
Expand Down

0 comments on commit b008c7b

Please sign in to comment.