This commit is contained in:
Ole Eskild Steensen 2022-10-31 14:31:43 +01:00
parent 37a73b82a2
commit 725a211252

View File

@ -56,8 +56,14 @@
gData
.links
.forEach(link => {
const a = gData.nodes[link.source];
const b = gData.nodes[link.target];
const a = gData
.nodes
.find(x => x.id === link.source);
const b = gData
.nodes
.find(x => x.id === link.target);
if (a && b) {
!a.neighbors && (a.neighbors = []);
!b.neighbors && (b.neighbors = []);
a
@ -75,6 +81,7 @@
b
.links
.push(link);
}
});
let Graph;