Skip to content

Commit

Permalink
fix(ProgressInidicator): remove null rendering (carbon-design-system#207
Browse files Browse the repository at this point in the history
)
  • Loading branch information
hellobrian authored and chrisdhanaraj committed Sep 5, 2017
1 parent 1c80688 commit 503bbfc
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions components/ProgressIndicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ const ProgressStep = ({ ...props }) => {
return (
<li className={classes}>
<svg>
<title>{description}</title>
<title>
{description}
</title>
{current
? <g>
<circle
Expand All @@ -51,7 +53,9 @@ const ProgressStep = ({ ...props }) => {
: null}
{incomplete ? <circle cx="12" cy="12" r="12" /> : null}
</svg>
<p className="bx--progress-label">{label}</p>
<p className="bx--progress-label">
{label}
</p>
<span className="bx--progress-line" />
</li>
);
Expand Down Expand Up @@ -100,20 +104,16 @@ class ProgressIndicator extends Component {
});

render() {
const { className, currentIndex, ...other } = this.props;
const { className, currentIndex, ...other } = this.props; // eslint-disable-line no-unused-vars
const classes = classnames({
'bx--progress': true,
[className]: className
});
if (currentIndex) {
return (
<ul className={classes} {...other}>
{this.renderSteps()}
</ul>
);
}

return null;
return (
<ul className={classes} {...other}>
{this.renderSteps()}
</ul>
);
}
}

Expand Down

0 comments on commit 503bbfc

Please sign in to comment.