diff --git a/src/core/update/updateSlides.mjs b/src/core/update/updateSlides.mjs index fc6a76d89..6cbc8b483 100644 --- a/src/core/update/updateSlides.mjs +++ b/src/core/update/updateSlides.mjs @@ -255,7 +255,7 @@ export default function updateSlides() { allSlidesSize += slideSizeValue + (spaceBetween || 0); }); allSlidesSize -= spaceBetween; - const maxSnap = allSlidesSize - swiperSize; + const maxSnap = allSlidesSize > swiperSize ? allSlidesSize - swiperSize : 0; snapGrid = snapGrid.map((snap) => { if (snap <= 0) return -offsetBefore; if (snap > maxSnap) return maxSnap + offsetAfter;