From 62bd551bfb67b52848d3b04fcc1f6b33c9f2e263 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Thu, 12 Oct 2017 15:05:40 +0200 Subject: SONAR-9938 Hide histogram in creation date facet on issues page when there is no results --- server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/sonar-web/src/main/js/apps/issues') diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.js b/server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.js index edc61cf799d..c897fb9ac49 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.js +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.js @@ -156,7 +156,7 @@ export default class CreationDateFacet extends React.PureComponent { const periods = Object.keys(stats); - if (periods.length < 2) { + if (periods.length < 2 || periods.every(period => !stats[period])) { return null; } -- cgit v1.2.3