Skip to content

Commit

Permalink
Revert "fix(autoplay): immediate proceed autoplay when `autoplay.dela…
Browse files Browse the repository at this point in the history
…y = 0`"

This reverts commit 81a4cc8.
  • Loading branch information
nolimits4web committed Jun 1, 2022
1 parent 56e050b commit d942e83
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/modules/autoplay/autoplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ export default function Autoplay({ swiper, extendParams, on, emit }) {
if ($activeSlideEl.attr('data-swiper-autoplay')) {
delay = $activeSlideEl.attr('data-swiper-autoplay') || swiper.params.autoplay.delay;
}

const proceed = () => {
clearTimeout(timeout);
timeout = nextTick(() => {
let autoplayResult;
if (swiper.params.autoplay.reverseDirection) {
if (swiper.params.loop) {
Expand Down Expand Up @@ -68,14 +68,6 @@ export default function Autoplay({ swiper, extendParams, on, emit }) {
else if (autoplayResult === false) {
run();
}
};
clearTimeout(timeout);
if (delay === 0) {
proceed();
return;
}
timeout = nextTick(() => {
proceed();
}, delay);
}
function start() {
Expand Down

0 comments on commit d942e83

Please sign in to comment.