Skip to content

Commit

Permalink
Fix AlertsStats when value is "0", it was showing "-"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesús Ángel committed Jun 10, 2019
1 parent cbea6bb commit 07a3e10
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions public/controllers/overview/components/alerts-stats.js
Expand Up @@ -11,10 +11,11 @@ export class AlertsStats extends Component {

buildStats() {
const stats = this.props.items.map(item => {
const title = typeof item.value !== 'undefined' ? item.value : '-';
return (
<EuiFlexItem key={`${item.description}${item.value}`}>
<EuiFlexItem key={`${item.description}${title}`}>
<EuiStat
title={item.value || '-'}
title={title}
description={item.description}
titleColor={item.color || 'primary'}
textAlign="center"
Expand Down

0 comments on commit 07a3e10

Please sign in to comment.