From 02c1502d40c3cad52592030c122df26295547b3b Mon Sep 17 00:00:00 2001 From: Aliaksei Yanachkin Date: Mon, 21 Nov 2022 16:11:23 +0400 Subject: [PATCH] fix(a11y): fix JS error "swiper.a11y is undefined" (#6226) --- src/modules/a11y/a11y.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/a11y/a11y.js b/src/modules/a11y/a11y.js index 29dd0120f..a702223d5 100644 --- a/src/modules/a11y/a11y.js +++ b/src/modules/a11y/a11y.js @@ -171,7 +171,9 @@ export default function A11y({ swiper, extendParams, on }) { const handlePointerUp = () => { requestAnimationFrame(() => { requestAnimationFrame(() => { - swiper.a11y.clicked = false; + if (!swiper.destroyed) { + swiper.a11y.clicked = false; + } }); }); };