Skip to content

Commit

Permalink
fix(autoplay): fix swiper getting stuck with 0 autoplay delay
Browse files Browse the repository at this point in the history
  • Loading branch information
nolimits4web committed May 30, 2022
1 parent 97b1bc5 commit 61db26f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/modules/autoplay/autoplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ export default function Autoplay({ swiper, extendParams, on, emit }) {
swiper.autoplay.paused = false;
if (!swiper.autoplay.running) {
stop();
} else if (swiper.params.autoplay.delay === 0 && swiper.animating) {
swiper.once('transitionEnd', () => {
run();
});
} else {
run();
}
Expand Down

0 comments on commit 61db26f

Please sign in to comment.