refactor(edges): simplify selected condition #397
This commit is contained in:
@@ -155,11 +155,7 @@ function renderEdge(
|
||||
targetPosition
|
||||
);
|
||||
|
||||
const isSelected = selectedElements
|
||||
? (selectedElements as Edge[]).some(
|
||||
(elm) => isEdge(elm) && elm.source === sourceId && elm.target === targetId && elm.id === edge.id
|
||||
)
|
||||
: false;
|
||||
const isSelected = selectedElements ? selectedElements.some((elm) => isEdge(elm) && elm.id === edge.id) : false;
|
||||
|
||||
return (
|
||||
<EdgeComponent
|
||||
|
||||
Reference in New Issue
Block a user