It is just my personal opinion, an early return here could improve the indentation

```js
if (Math.abs(deltaX) <= swipeThreshold) {
  return;
}
```