Skip to content

Commit

Permalink
Merge pull request leecade#939 from deepakaggarwal7/master
Browse files Browse the repository at this point in the history
Update index.js
  • Loading branch information
ArrayZoneYour authored Jun 26, 2019
2 parents e2f8d9e + aa1e9df commit c99f80a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ export default class extends Component {
componentWillReceiveProps(nextProps) {
if (!nextProps.autoplay && this.autoplayTimer)
clearTimeout(this.autoplayTimer)
if (nextProps.index === this.props.index) return
this.setState(
this.initState(nextProps, this.props.index !== nextProps.index)
)
Expand Down

0 comments on commit c99f80a

Please sign in to comment.