|
@@ -60,6 +60,7 @@ export default ({images = [], className, onChange, onClick, ref, current:propCur
|
|
|
|
|
|
const onTouchEnd = () => {
|
|
|
if (!containerRef.current) return
|
|
|
+ if (imgs.length !== images.length) return
|
|
|
if (inTouch.current){
|
|
|
if (timeout.current) clearInterval(timeout.current)
|
|
|
|
|
@@ -105,6 +106,7 @@ export default ({images = [], className, onChange, onClick, ref, current:propCur
|
|
|
|
|
|
const onScroll = e => {
|
|
|
if (autoscroll.current) return;
|
|
|
+ if (imgs.length !== images.length) return
|
|
|
|
|
|
if (timeout.current) clearInterval(timeout.current)
|
|
|
|
|
@@ -118,6 +120,7 @@ export default ({images = [], className, onChange, onClick, ref, current:propCur
|
|
|
|
|
|
const onImgClick = (e, i) => {
|
|
|
const touchDevice = isTouchDevice()
|
|
|
+ if (imgs.length !== images.length) return
|
|
|
if (touchDevice && typeof onClick === 'function'){
|
|
|
onClick(i)
|
|
|
}
|