aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/render-msg.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js
index c0de668..316709e 100644
--- a/lib/render-msg.js
+++ b/lib/render-msg.js
@@ -723,6 +723,10 @@ RenderMsg.prototype.gitRepo = function (cb) {
})
}
+function asString(str) {
+ return str ? String(str) : str
+}
+
RenderMsg.prototype.gitUpdate = function (cb) {
var self = this
// h('a', {href: self.toUrl(self.c.repo)}, 'ssb://' + self.c.repo),
@@ -740,7 +744,7 @@ RenderMsg.prototype.gitUpdate = function (cb) {
'git push ', a, ' ',
!isNaN(size) ? [self.render.formatSize(size), ' '] : '',
self.c.refs ? h('ul', Object.keys(self.c.refs).map(function (ref) {
- var id = String(self.c.refs[ref])
+ var id = asString(self.c.refs[ref])
var type = /^refs\/tags/.test(ref) ? 'tag' : 'commit'
var path = id && ('/git/' + type + '/' + encodeURIComponent(id)
+ '?msg=' + encodeURIComponent(self.msg.key))