diff --git a/lib/infobox/node.js b/lib/infobox/node.js index 612f55e..a15b40a 100644 --- a/lib/infobox/node.js +++ b/lib/infobox/node.js @@ -27,14 +27,12 @@ define(['sorttable', 'snabbdom', 'd3-interpolate', 'moment', 'helper'], } function showFirmware(d) { - var release = helper.dictGet(d.nodeinfo, ['software', 'firmware', 'release']); - var base = helper.dictGet(d.nodeinfo, ['software', 'firmware', 'base']); - - if (release === null || base === null) { - return undefined; - } - - return release + ' / ' + base; + return [ + helper.dictGet(d.nodeinfo, ['software', 'firmware', 'release']), + helper.dictGet(d.nodeinfo, ['software', 'firmware', 'base']) + ].filter(function (n) { + return n !== null; + }).join(' / ') || undefined; } function showSite(d, config) {