diff --git a/src/index.jsx b/src/index.jsx index 1f9265b..d3309b6 100644 --- a/src/index.jsx +++ b/src/index.jsx @@ -74,8 +74,8 @@ class CircularProgressbar extends React.Component { } render() { - const {percentage, classForPercentage, textForPercentage, className, strokeWidth} = this.props; - const classForPercentage = classForPercentage ? classForPercentage(percentage) : ''; + const {percentage, textForPercentage, className, strokeWidth} = this.props; + const classForPercentage = this.props.classForPercentage ? this.props.classForPercentage(percentage) : ''; const pathDescription = this.getPathDescription(); const text = textForPercentage ? textForPercentage(percentage) : null;