From b248a182af35c2e72d1679f104422d0343df4df9 Mon Sep 17 00:00:00 2001 From: Ezinwa Okpoechi Date: Mon, 20 Feb 2017 17:38:48 +0100 Subject: [PATCH] fix(Progress): do not show progress without progress or label props --- src/modules/Progress/Progress.js | 5 ++--- test/specs/modules/Progress/Progress-test.js | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/modules/Progress/Progress.js b/src/modules/Progress/Progress.js index 5af5fec978..cda93cea8f 100644 --- a/src/modules/Progress/Progress.js +++ b/src/modules/Progress/Progress.js @@ -140,10 +140,9 @@ class Progress extends Component { } showProgress = () => { - const { label, precision, progress, total, value } = this.props + const { label, precision, progress } = this.props - if (label || progress || !_.isUndefined(precision)) return true - return !(_.every([total, value], _.isUndefined)) + return label || progress || !_.isUndefined(precision) } render() { diff --git a/test/specs/modules/Progress/Progress-test.js b/test/specs/modules/Progress/Progress-test.js index 886132094f..2189396ecc 100644 --- a/test/specs/modules/Progress/Progress-test.js +++ b/test/specs/modules/Progress/Progress-test.js @@ -191,7 +191,7 @@ describe('Progress', () => { describe('total/value', () => { it('calculates the percent complete', () => { - shallow() + shallow() .children() .find('.progress') .should.contain.text('50%')