Skip to content

Commit

Permalink
fix: target edge invisible if source invisible
Browse files Browse the repository at this point in the history
  • Loading branch information
doctoroyy committed Oct 27, 2021
1 parent 84adeed commit 3b50b12
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/container/EdgeRenderer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,7 @@ const Edge = ({
const sourcePosition = sourceHandle ? sourceHandle.position : Position.Bottom;
const targetPosition = targetHandle ? targetHandle.position : Position.Top;

if (!sourceHandle) {
// console.warn(`couldn't create edge for source handle id: ${sourceHandleId}; edge id: ${edge.id}`);
return null;
}

if (!targetHandle) {
// console.warn(`couldn't create edge for target handle id: ${targetHandleId}; edge id: ${edge.id}`);
if ((!sourceHandle || !targetHandle) && !onlyRenderVisibleElements) {
return null;
}

Expand Down

0 comments on commit 3b50b12

Please sign in to comment.