summaryrefslogtreecommitdiff
path: root/gitweb/gitweb.js
diff options
context:
space:
mode:
Diffstat (limited to 'gitweb/gitweb.js')
-rw-r--r--gitweb/gitweb.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/gitweb/gitweb.js b/gitweb/gitweb.js
index f1ba9ae52b..5292c37d2c 100644
--- a/gitweb/gitweb.js
+++ b/gitweb/gitweb.js
@@ -562,7 +562,12 @@ function handleLine(commit, group) {
td_sha1.rowSpan = group.numlines;
a_sha1.href = projectUrl + 'a=commit;h=' + commit.sha1;
- a_sha1.firstChild.data = commit.sha1.substr(0, 8);
+ if (a_sha1.firstChild) {
+ a_sha1.firstChild.data = commit.sha1.substr(0, 8);
+ } else {
+ a_sha1.appendChild(
+ document.createTextNode(commit.sha1.substr(0, 8)));
+ }
if (group.numlines >= 2) {
var fragment = document.createDocumentFragment();
var br = document.createElement("br");