From 684a05c5f4bc21386aa5f3a7f103836a60cc7f00 Mon Sep 17 00:00:00 2001 From: cel Date: Fri, 14 Apr 2017 20:02:43 -0700 Subject: Render ssb-dns messages --- lib/render.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/render.js') diff --git a/lib/render.js b/lib/render.js index 80e4893..7890c1f 100644 --- a/lib/render.js +++ b/lib/render.js @@ -162,7 +162,7 @@ Render.prototype.prepareLink = function (link, cb) { if (typeof link === 'string') link = {link: link} if (link.name || !link.link) cb(null, link) else this.app.getAbout(link.link, function (err, about) { - if (err) return cb(err) + if (err) return cb(null, link) link.name = about.name || (link.link.substr(0, 8) + '…') if (link.name && link.name[0] === link.link[0]) { link.name = link.name.substr(1) @@ -188,7 +188,8 @@ Render.prototype.idLink = function (link, cb) { self.prepareLink(link, function (err, link) { if (err) return cb(err) a.href = self.toUrl(link.link) - a.childNodes[0].textContent = '@' + link.name + var sigil = link.link && link.link[0] || '@' + a.childNodes[0].textContent = sigil + link.name cb() }) return a -- cgit v1.2.3