Skip to content

Commit

Permalink
Merge pull request YahooArchive#349 from drewfish/gv-guard
Browse files Browse the repository at this point in the history
guard against missing edges in `mojito gv`
  • Loading branch information
Isao Yagi committed Aug 6, 2012
2 parents 8fe58ff + f69eedc commit e2d77c4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions source/lib/app/commands/gv.js
Original file line number Diff line number Diff line change
Expand Up @@ -396,10 +396,12 @@ function trace(graph, options) {
head.attrs.trace = true;
doneNodes[headName] = true;

for (e = 0; e < edges[headName].length; e += 1) {
edge = edges[headName][e];
edge.attrs.trace = true;
todoNodes.push(edge.tail);
if (edges[headName]) {
for (e = 0; e < edges[headName].length; e += 1) {
edge = edges[headName][e];
edge.attrs.trace = true;
todoNodes.push(edge.tail);
}
}
}
}
Expand Down

0 comments on commit e2d77c4

Please sign in to comment.