diff --git a/src/index.js b/src/index.js index d9deeb4..7b135cc 100644 --- a/src/index.js +++ b/src/index.js @@ -194,6 +194,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)) }