Skip to content

Commit

Permalink
[#643] Fixes swipe not working on last slide in RTL
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaolin committed Jul 30, 2023
1 parent 5078896 commit b8d156e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/ImageGallery.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -748,13 +748,13 @@ class ImageGallery extends React.Component {
}

canSlideLeft() {
const { infinite, isRTL } = this.props;
return infinite || (isRTL ? this.canSlideNext() : this.canSlidePrevious());
const { infinite } = this.props;
return infinite || this.canSlidePrevious();
}

canSlideRight() {
const { infinite, isRTL } = this.props;
return infinite || (isRTL ? this.canSlidePrevious() : this.canSlideNext());
const { infinite } = this.props;
return infinite || this.canSlideNext();
}

canSlidePrevious() {
Expand Down

0 comments on commit b8d156e

Please sign in to comment.