diff options
-rw-r--r-- | html/js/git-deps-graph.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/html/js/git-deps-graph.js b/html/js/git-deps-graph.js index 8e31548..a0994bc 100644 --- a/html/js/git-deps-graph.js +++ b/html/js/git-deps-graph.js @@ -119,13 +119,12 @@ function build_constraint(parent_sha) { } function add_data(data) { - for (var i in data.commits) { - add_node(data.commits[i]); - } - for (var i in data.dependencies) { - var dep = data.dependencies[i]; + $.each(data.commits, function (i, commit) { + add_node(commit); + }); + $.each(data.dependencies, function (i, dep) { add_link(dep.parent, dep.child); - } + }); build_constraints(); } |