diff --git a/frontend/src/components/SwipeTabs.tsx b/frontend/src/components/SwipeTabs.tsx index bb3e46e..10ceffd 100644 --- a/frontend/src/components/SwipeTabs.tsx +++ b/frontend/src/components/SwipeTabs.tsx @@ -28,10 +28,10 @@ const EDGE_RESISTANCE = 0.35; const DEFAULT_THRESHOLD = 0.2; const DEFAULT_RENDER_WINDOW = 1; -const findTouchById = (touches: TouchList, id: number) => { +const findTouchById = (touches: React.TouchList, id: number): React.Touch | null => { for (let i = 0; i < touches.length; i += 1) { - const touch = touches[i]; - if (touch.identifier === id) { + const touch = touches.item(i); + if (touch && touch.identifier === id) { return touch; } }