diff --git a/src/core/usePointer.ts b/src/core/usePointer.ts index 35d8e66..f4d1de5 100644 --- a/src/core/usePointer.ts +++ b/src/core/usePointer.ts @@ -100,7 +100,8 @@ export default function usePointer(options: PointerConfigInterface): PointerInte function updatePosition(event: TouchEvent | MouseEvent) { let x, y - if (event instanceof TouchEvent && event.touches && event.touches.length > 0) { + // @ts-ignore + if (event.touches && event.touches.length > 0) { x = (event).touches[0].clientX y = (event).touches[0].clientY } else {