diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-04-08 21:27:34 -0700 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-04-09 22:59:28 -0700 |
commit | a9e1b1309bbe24128ae26e9d3389d2c0ff2456ef (patch) | |
tree | 276880dcba16435c7ca4e8bf9774ef7bc5d5c523 /lib | |
parent | 58afd831a3e73f364e0418942b2553fa1fc2f098 (diff) | |
download | patchfoo-a9e1b1309bbe24128ae26e9d3389d2c0ff2456ef.tar.gz patchfoo-a9e1b1309bbe24128ae26e9d3389d2c0ff2456ef.zip |
Add missing sigil
Diffstat (limited to 'lib')
-rw-r--r-- | lib/render-msg.js | 2 | ||||
-rw-r--r-- | lib/render.js | 2 | ||||
-rw-r--r-- | lib/serve.js | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js index 380d451..cbdf002 100644 --- a/lib/render-msg.js +++ b/lib/render-msg.js @@ -313,7 +313,7 @@ RenderMsg.prototype.title = function (cb) { RenderMsg.prototype.getAboutName = function (id, cb) { this.app.getAbout(id, function (err, about) { - cb(err, about && about.name || String(id).substr(1, 8) + '…') + cb(err, about && about.name || (String(id).substr(0, 8) + '…')) }) } diff --git a/lib/render.js b/lib/render.js index 3a39ccb..80e4893 100644 --- a/lib/render.js +++ b/lib/render.js @@ -163,7 +163,7 @@ Render.prototype.prepareLink = function (link, cb) { if (link.name || !link.link) cb(null, link) else this.app.getAbout(link.link, function (err, about) { if (err) return cb(err) - link.name = about.name + link.name = about.name || (link.link.substr(0, 8) + '…') if (link.name && link.name[0] === link.link[0]) { link.name = link.name.substr(1) } diff --git a/lib/serve.js b/lib/serve.js index 30c1239..32932c5 100644 --- a/lib/serve.js +++ b/lib/serve.js @@ -559,7 +559,7 @@ Serve.prototype.userFeed = function (id, ext) { self.renderThreadPaginated(opts, id, q), self.wrapMessages(), self.wrapUserFeed(id), - self.wrapPage(about.name), + self.wrapPage(about.name || id), self.respondSink(200, { 'Content-Type': ctype(ext) }) |