Commit 7c57c1321fc73354ed03fe8fae1263bf5acfe329
Don't show empty message lists
cel committed on 12/8/2017, 11:57:43 PMParent: 416264d7b5ed819683c4efd89db7aeef6e47595c
Files changed
lib/render-msg.js | changed |
lib/render-msg.js | ||
---|---|---|
@@ -1069,15 +1069,17 @@ | ||
1069 | 1069 … | return [h('a', {href: self.toUrl(id)}, truncate(id, 8)), ' '] |
1070 | 1070 … | } |
1071 | 1071 … | self.render.npmPackageMentions(self.c.mentions, function (err, el) { |
1072 | 1072 … | if (err) return cb(err) |
1073 … | + var dependencyLinks = u.toArray(self.c.dependencyBranch) | |
1074 … | + var versionLinks = u.toArray(self.c.versionBranch) | |
1073 | 1075 … | self.wrap(h('div', [ |
1074 | 1076 … | el, |
1075 | - Array.isArray(self.c.dependencyBranch) ? h('div', | |
1076 | - 'dependencies via: ', self.c.dependencyBranch.map(renderIdLink) | |
1077 … | + dependencyLinks.length ? h('div', | |
1078 … | + 'dependencies via: ', dependencyLinks.map(renderIdLink) | |
1077 | 1079 … | ) : '', |
1078 | - Array.isArray(self.c.versionBranch) ? h('div', | |
1079 | - 'previous versions: ', self.c.versionBranch.map(renderIdLink) | |
1080 … | + versionLinks.length ? h('div', | |
1081 … | + 'previous versions: ', versionLinks.map(renderIdLink) | |
1080 | 1082 … | ) : '' |
1081 | 1083 … | ]), elCb) |
1082 | 1084 … | return done(cb) |
1083 | 1085 … | }) |
Built with git-ssb-web