X-Git-Url: https://git.ladys.computer/Gitweb/blobdiff_plain/367f1aa76008d203d3ef9f2ec5580a750d45c854823d513a9e45bcd5b6caa8f9..3e2dac3f3df399d9563822ef1ed90bb5a776d39e49e00d1f2d6a7133a9ed3afb:/gitweb.js?ds=sidebyside diff --git a/gitweb.js b/gitweb.js index 1b0d1f9..ff2d533 100644 --- a/gitweb.js +++ b/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");