Skip to content

Commit 869bb84

Browse files
Heptoniuszbezdicek
andauthored
fix(zoom): add sanity check before allowTouchMove call in timeout (#7723)
Co-authored-by: Zdenek Bezdicek <zdb@ciklum.com>
1 parent cc3dda3 commit 869bb84

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/modules/zoom/zoom.mjs

+1
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ export default function Zoom({ swiper, extendParams, on, emit }) {
247247
clearTimeout(allowTouchMoveTimeout);
248248
swiper.touchEventsData.preventTouchMoveFromPointerMove = true;
249249
allowTouchMoveTimeout = setTimeout(() => {
250+
if (swiper.destroyed) return;
250251
allowTouchMove();
251252
});
252253
}

0 commit comments

Comments
 (0)