mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
Removing bug with touchstart
This commit is contained in:
@@ -50,10 +50,12 @@ const ProductSlider: FC = ({ children }) => {
|
||||
)
|
||||
|
||||
return () => {
|
||||
sliderContainerRef.current!.removeEventListener(
|
||||
'touchstart',
|
||||
preventNavigation
|
||||
)
|
||||
if (sliderContainerRef.current) {
|
||||
sliderContainerRef.current!.removeEventListener(
|
||||
'touchstart',
|
||||
preventNavigation
|
||||
)
|
||||
}
|
||||
}
|
||||
}, [])
|
||||
|
||||
|
Reference in New Issue
Block a user