aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Spiers <git@adamspiers.org>2015-01-08 17:06:59 +0000
committerAdam Spiers <git@adamspiers.org>2015-01-08 17:06:59 +0000
commita700c11e7ed3afdf9e9ee159bf2d73ef5946c36c (patch)
tree56f181f8edeb5c6ad80e30152cbe843a3ca93314
parent17a03b45fa3b578e93521b81b56ed46cc10b4c1f (diff)
downloadgit-deps-a700c11e7ed3afdf9e9ee159bf2d73ef5946c36c.tar.gz
switch to using jQuery.each
-rw-r--r--html/js/git-deps-graph.js11
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();
}