#31 : Fix autoplay progress for non infinite case

This commit is contained in:
Vadim
2021-07-03 14:02:39 +03:00
parent a6a73d54bb
commit 7ace64b0a1

View File

@@ -174,7 +174,13 @@
}
function applyAutoplay() {
if (!infinite && currentPageIndex === pagesCount - 1) {
// prevent progress change if not infinite for first and last page
if (
!infinite && (
(autoplayDirection === NEXT && currentPageIndex === pagesCount - 1) ||
(autoplayDirection === PREV && currentPageIndex === 0)
)
) {
progressManager.reset()
return
}