From 2c039c372f7ae301f77f62b459f2a73eb86c4699 Mon Sep 17 00:00:00 2001 From: cel Date: Fri, 23 Nov 2018 14:14:28 -1000 Subject: Hide redundant about root and branch links --- lib/render-msg.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') 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 ' : [ -- cgit v1.2.3