Skip to content

Commit 98c063e

Browse files
committed
Fix infinite loop
1 parent 55d56d9 commit 98c063e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

views/graph-view/src/components/CommunityGraph.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ function findNodes(links, source) {
1616

1717
if (alreadyIn) return acc;
1818

19+
if (hasSource && link.data.source === link.data.target) {
20+
return [...acc, link];
21+
}
22+
1923
if (hasSource) {
2024
const newLinks = findNodes(links, link.data.target);
2125
return [...acc, ...newLinks, link];

0 commit comments

Comments
 (0)