From 0aa52a10e3957c281e2cabb8ef42b70b490af12a Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Wed, 25 Oct 2017 15:04:45 +0200 Subject: better last bar tooltip in creation date facet --- .../sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (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 2f4e5038b86..959840083e2 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 @@ -175,8 +175,9 @@ export default class CreationDateFacet extends React.PureComponent { formatMeasure(stats[start], 'SHORT_INT') + '
' + formatDate(startDate, longFormatterOption); - if (endDate && !isSameDay(endDate, startDate)) { - tooltip += ' – ' + formatDate(endDate, longFormatterOption); + const tooltipEndDate = endDate || Date.now(); + if (!isSameDay(tooltipEndDate, startDate)) { + tooltip += ' – ' + formatDate(tooltipEndDate, longFormatterOption); } return { -- cgit v1.2.3