aboutsummaryrefslogtreecommitdiff
path: root/lib/render-msg.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/render-msg.js')
-rw-r--r--lib/render-msg.js22
1 files changed, 12 insertions, 10 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js
index 1af0b34..b150522 100644
--- a/lib/render-msg.js
+++ b/lib/render-msg.js
@@ -108,13 +108,14 @@ RenderMsg.prototype.wrap = function (content, cb) {
{href: this.toUrl(this.msg.key)}, this.msg.key)),
channel ? [' ', h('a', {href: this.toUrl(channel)}, channel)] : ''),
this.issues(done())),
- h('td.msg-right', h('form', {method: 'post', action: '/vote'},
- this.msg.rel ? [this.msg.rel, ' '] : '',
- this.msg.key ? [
+ h('td.msg-right', this.msg.key ?
+ h('form', {method: 'post', action: '/vote'},
+ this.msg.rel ? [this.msg.rel, ' '] : '',
h('a', {href: this.toUrl(this.msg.key) + '?raw'}, 'raw'), ' ',
this.voteFormInner('dig')
- ] : ''
- ))
+ ) : [
+ this.msg.rel ? [this.msg.rel, ' '] : ''
+ ])
), h('tr',
h('td.msg-content', {colspan: 2}, content)
)])
@@ -138,13 +139,14 @@ RenderMsg.prototype.wrapMini = function (content, cb) {
href: this.msg.key ? this.toUrl(this.msg.key) : undefined
}, htime(date)), ' ',
content),
- h('td.msg-right', h('form', {method: 'post', action: '/vote'},
- this.msg.rel ? [this.msg.rel, ' '] : '',
- this.msg.key ? [
+ h('td.msg-right', this.msg.key ?
+ h('form', {method: 'post', action: '/vote'},
+ this.msg.rel ? [this.msg.rel, ' '] : '',
h('a', {href: this.toUrl(this.msg.key) + '?raw'}, 'raw'), ' ',
this.voteFormInner('dig')
- ] : ''
- ))
+ ) : [
+ this.msg.rel ? [this.msg.rel, ' '] : ''
+ ])
))
done(cb)
}