diff --git a/html/views/history/history.js b/html/views/history/history.js index 78184e8..af389ef 100644 --- a/html/views/history/history.js +++ b/html/views/history/history.js @@ -184,15 +184,18 @@ var loadCommit = function(commitObject, currentRef) { } } + // Scroll to top + scroll(0, 0); + + if (!commit.parents) + return; + for (var i = 0; i < commit.parents.length; i++) { var newRow = $("commit_header").insertRow(-1); newRow.innerHTML = "Parent:" + "" + commit.parents[i] + ""; } - - // Scroll to top - scroll(0, 0); } var showDiff = function() {