Skip to content

Commit 1030566

Browse files
committed
Fix for the traversal bug
1 parent 1db0d3a commit 1030566

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/misc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ while (len--) {
771771
}
772772
node.visited = true;
773773

774-
var N = adjacency[node.id].length;
774+
var N = adjacency[node.id] ? adjacency[node.id].length : 0;
775775
while (N--) {
776776
let neighbor = adjacency[node.id][N];
777777
if (!neighbor[0].visited) {

0 commit comments

Comments
 (0)