diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2018-08-20 19:01:03 -0700 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2018-08-21 15:43:55 -0700 |
commit | 6f40e2afcea954c4adc8feb206aaf1ebc76c05ba (patch) | |
tree | 7ae46f4dd9aa4d47dac30f6a13ed7b86a35e6378 /lib/render-msg.js | |
parent | 1a3e24b50ff38fadb7d1e364493341b4f8c9bafa (diff) | |
download | patchfoo-6f40e2afcea954c4adc8feb206aaf1ebc76c05ba.tar.gz patchfoo-6f40e2afcea954c4adc8feb206aaf1ebc76c05ba.zip |
Handle empty git-ssb commit object
Missing sha1 for commit with empty body
fixed in %MhqXtikUPC56S9M4uzSGMYtuGNh/iFPDUoggDtWZVEE=.sha256
Diffstat (limited to 'lib/render-msg.js')
-rw-r--r-- | lib/render-msg.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js index cff8f29..c0de668 100644 --- a/lib/render-msg.js +++ b/lib/render-msg.js @@ -754,9 +754,9 @@ RenderMsg.prototype.gitUpdate = function (cb) { h('ul', self.c.commits.map(function (commit) { var path = '/git/commit/' + encodeURIComponent(commit.sha1) + '?msg=' + encodeURIComponent(self.msg.key) - return h('li', h('a', {href: self.render.toUrl(path)}, - h('code', String(commit.sha1).substr(0, 8))), ' ', - self.linkify(String(commit.title)), + return h('li', commit.sha1 ? [h('a', {href: self.render.toUrl(path)}, + h('code', String(commit.sha1).substr(0, 8))), ' '] : '', + commit.title ? self.linkify(String(commit.title)) : '', self.render.gitCommitBody(commit.body) ) })) : '', |