Skip to content

Commit

Permalink
fix(core): fix case with not enough slides with centeredSlidesBounds
Browse files Browse the repository at this point in the history
fixes #6689
  • Loading branch information
nolimits4web committed Jun 7, 2023
1 parent e402f05 commit 93b4279
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/update/updateSlides.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ export default function updateSlides() {
allSlidesSize -= spaceBetween;
const maxSnap = allSlidesSize - swiperSize;
snapGrid = snapGrid.map((snap) => {
if (snap < 0) return -offsetBefore;
if (snap <= 0) return -offsetBefore;
if (snap > maxSnap) return maxSnap + offsetAfter;
return snap;
});
Expand Down

0 comments on commit 93b4279

Please sign in to comment.