Skip to content

Commit

Permalink
fix(Progress): do not show progress without progress or label props
Browse files Browse the repository at this point in the history
  • Loading branch information
Ezinwa Okpoechi committed Feb 20, 2017
1 parent 691f51e commit 2056b84
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/modules/Progress/Progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ class Progress extends Component {
const { label, precision, progress, total, value } = this.props

if (label || progress || !_.isUndefined(precision)) return true
return !(_.every([total, value], _.isUndefined))
}

render() {
Expand Down
2 changes: 1 addition & 1 deletion test/specs/modules/Progress/Progress-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ describe('Progress', () => {

describe('total/value', () => {
it('calculates the percent complete', () => {
shallow(<Progress value={1} total={2} />)
shallow(<Progress value={1} total={2} progress />)
.children()
.find('.progress')
.should.contain.text('50%')
Expand Down

0 comments on commit 2056b84

Please sign in to comment.