Skip to content

Commit

Permalink
fix(thumbs): correct reinit thumbs
Browse files Browse the repository at this point in the history
fixes #7880
  • Loading branch information
nolimits4web committed Mar 4, 2025
1 parent f7febe1 commit 1cf24d4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/modules/thumbs/thumbs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ export default function Thumb({ swiper, extendParams, on }) {
if (initialized) return false;
initialized = true;
const SwiperClass = swiper.constructor;

if (thumbsParams.swiper instanceof SwiperClass) {
if (thumbsParams.swiper.destroyed) {
initialized = false;
return false;
}
swiper.thumbs.swiper = thumbsParams.swiper;
Object.assign(swiper.thumbs.swiper.originalParams, {
watchSlidesProgress: true,
Expand Down

0 comments on commit 1cf24d4

Please sign in to comment.