Skip to content

Commit

Permalink
#609 Fix invalid invocation of Carousel handlers.
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Siatka committed Jul 10, 2020
1 parent bc8ba0a commit 599252a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/controls/carousel/Carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,10 @@ export class Carousel extends React.Component<ICarouselProps, ICarouselState> {
} else {
nextIndex = this.getNextIndex(nextButtonClicked);
if (nextIndex !== currentIndex) {
if (nextButtonClicked) {
if (nextButtonClicked && this.props.onMoveNextClicked) {
this.props.onMoveNextClicked(nextIndex);
}
else {
else if(this.props.onMovePrevClicked) {
this.props.onMovePrevClicked(nextIndex);
}
}
Expand Down

0 comments on commit 599252a

Please sign in to comment.