Skip to content

Commit

Permalink
Show progress bar value when zero
Browse files Browse the repository at this point in the history
Fixes #973
  • Loading branch information
Nelly Haglund committed Aug 8, 2019
1 parent d8a21cd commit 82026ab
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/progressbar/ProgressBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export class ProgressBar extends Component {

static defaultProps = {
id: null,
value: null,
showValue: true,
unit: '%',
style: null,
Expand All @@ -31,7 +30,7 @@ export class ProgressBar extends Component {
<div className="p-progressbar-label">{this.props.displayValue}</div>
);
}
else if (this.props.showValue && this.props.value) {
else if (this.props.showValue && 'value' in this.props) {
return (
<div className="p-progressbar-label">{this.props.value + this.props.unit}</div>
);
Expand Down

0 comments on commit 82026ab

Please sign in to comment.