swiper/react thumbs Cannot conve
2023-02-16 本文已影响0人
chenjieyi
![](https://img.haomeiwen.com/i13172338/b625f54fb7970eed.png)
解决方案:
thumbs={{ swiper: thumbsSwiper }}
改成
thumbs={{ swiper: thumbsSwiper && !thumbsSwiper.destroyed ? thumbsSwiper : null, }}
参考文献:https://github.com/nolimits4web/swiper/issues/5957
ps:可在swiper github的issue搜索 Cannot convert undefined or null to object
![](https://img.haomeiwen.com/i13172338/7926b0fbda84e70e.png)