Skip to content

Commit

Permalink
Refactor #1030
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Oct 15, 2019
1 parent 8bbf51c commit c8d99b1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/carousel/Carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ export class Carousel extends Component {
let stateChanged = false;
let totalShiftedItems = this.state.totalShiftedItems;

if(this.props.autoplayInterval) {
if (this.props.autoplayInterval) {
this.stopAutoplay();
}

Expand Down Expand Up @@ -500,7 +500,7 @@ export class Carousel extends Component {
}
}

if(!stateChanged && this.isAutoplay()) {
if (!stateChanged && this.isAutoplay()) {
this.startAutoplay();
}
}
Expand All @@ -509,6 +509,10 @@ export class Carousel extends Component {
if (this.props.responsiveOptions) {
this.unbindDocumentListeners();
}

if (this.props.autoplayInterval) {
this.stopAutoplay();
}
}

renderItems() {
Expand Down

0 comments on commit c8d99b1

Please sign in to comment.