Skip to content

Commit

Permalink
fix(zoom): add sanity check before allowTouchMove call in timeout (#7723
Browse files Browse the repository at this point in the history
)

Co-authored-by: Zdenek Bezdicek <zdb@ciklum.com>
  • Loading branch information
Heptonius and zbezdicek committed Sep 8, 2024
1 parent cc3dda3 commit 869bb84
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/modules/zoom/zoom.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ export default function Zoom({ swiper, extendParams, on, emit }) {
clearTimeout(allowTouchMoveTimeout);
swiper.touchEventsData.preventTouchMoveFromPointerMove = true;
allowTouchMoveTimeout = setTimeout(() => {
if (swiper.destroyed) return;
allowTouchMove();
});
}
Expand Down

0 comments on commit 869bb84

Please sign in to comment.