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