Skip to content

Commit 9dece7d

Browse files
authored
fix(react): react strict mode double initialization errors for thumbs (#7789)
1 parent 1692ba4 commit 9dece7d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components-shared/update-swiper.mjs

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ function updateSwiper({
2626
changedParams.includes('thumbs') &&
2727
passedParams.thumbs &&
2828
passedParams.thumbs.swiper &&
29+
!passedParams.thumbs.swiper.destroyed &&
2930
currentParams.thumbs &&
30-
!currentParams.thumbs.swiper
31+
(!currentParams.thumbs.swiper || currentParams.thumbs.swiper.destroyed)
3132
) {
3233
needThumbsInit = true;
3334
}

0 commit comments

Comments
 (0)