diff --git a/src/core/events/onResize.js b/src/core/events/onResize.js index 7cdaad8d6..d40b5a3d6 100644 --- a/src/core/events/onResize.js +++ b/src/core/events/onResize.js @@ -1,4 +1,3 @@ -let timeout; export default function onResize() { const swiper = this; @@ -42,8 +41,8 @@ export default function onResize() { } if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) { - clearTimeout(timeout); - timeout = setTimeout(() => { + clearTimeout(swiper.autoplay.resizeTimeout); + swiper.autoplay.resizeTimeout = setTimeout(() => { if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) { swiper.autoplay.resume(); }