From 1a3513086998384a6a2c22f66c060215f241d673 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 12 Mar 2019 10:00:10 +0000 Subject: [PATCH] Fix simple header counters to correctly handle zero, take two --- src/components/views/rooms/AuxPanel.js | 48 ++++++++++++-------------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/src/components/views/rooms/AuxPanel.js b/src/components/views/rooms/AuxPanel.js index e84629e89d..3c2cf870b8 100644 --- a/src/components/views/rooms/AuxPanel.js +++ b/src/components/views/rooms/AuxPanel.js @@ -213,35 +213,33 @@ module.exports = React.createClass({ const severity = counter.severity; const stateKey = counter.stateKey; - if (title && value && severity) { - let span = { title }: { value } - - if (link) { - span = ( - - { span } - - ); - } + let span = { title }: { value } + if (link) { span = ( - - {span} - - ); - - counters.push(span); - counters.push( - + + { span } + ); } + + span = ( + + {span} + + ); + + counters.push(span); + counters.push( + + ); }); if (counters.length > 0) {