diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2018-11-23 14:14:28 -1000 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2018-11-23 14:17:45 -1000 |
commit | 2c039c372f7ae301f77f62b459f2a73eb86c4699 (patch) | |
tree | b6d4c4b891e57c2a7c6435126f91585fa3f9479c | |
parent | bd97292b635469091b048141038936cceb42ff7c (diff) | |
download | patchfoo-2c039c372f7ae301f77f62b459f2a73eb86c4699.tar.gz patchfoo-2c039c372f7ae301f77f62b459f2a73eb86c4699.zip |
Hide redundant about root and branch links
-rw-r--r-- | lib/render-msg.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js index 78b3570..5a3723e 100644 --- a/lib/render-msg.js +++ b/lib/render-msg.js @@ -612,12 +612,14 @@ RenderMsg.prototype.about = function (cb) { var hasDescription = this.c.description != null // if this about message gives the thing a name, show its id var showComputedName = !isSelf && !this.c.name + var target = this.c.about this.wrap([ - this.c.root ? h('div', + this.c.root && this.c.root !== target ? h('div', h('small', '→ ', this.link1(this.c.root, done())) ) : '', u.toArray(this.c.branch).map(function (id) { + if (id === target) return return h('div', h('small', ' ↳', this.link1(id, done()))) }.bind(this)), isSelf ? 'self-describes as ' : [ |