We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3186d15 commit 2be565eCopy full SHA for 2be565e
1 file changed
src/block/carousel/frontend-carousel.js
@@ -677,8 +677,9 @@ class _StackableCarousel {
677
return result
678
}, { slide: 1, offsetDiff: 1000 } )
679
680
- if ( this.infiniteScroll && slide > this.slideEls.length ) {
681
- slide -= this.slideEls.length
+ if ( this.infiniteScroll ) {
+ // Clamp clone indexes back to the original slide range.
682
+ slide = ( ( slide - 1 ) % this.slideEls.length ) + 1
683
}
684
685
this.currentSlide = slide
0 commit comments