Skip to content

Commit

Permalink
fix: removed unnecesary array from Math.max
Browse files Browse the repository at this point in the history
  • Loading branch information
kubabutkiewicz committed Sep 21, 2023
1 parent b481689 commit 1d24ec4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libs/Accessibility/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const getHitSlopForSize = ({x, y}: {x: number; y: number}) => {
/* according to https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/adaptivity-and-layout/
the minimum tappable area is 44x44 points */
const minimumSize = 44;
const hitSlopVertical = Math.max(...[minimumSize - x, 0]) / 2;
const hitSlopHorizontal = Math.max(...[minimumSize - y, 0]) / 2;
const hitSlopVertical = Math.max(minimumSize - x, 0) / 2;
const hitSlopHorizontal = Math.max(minimumSize - y, 0) / 2;
return {
top: hitSlopVertical,
bottom: hitSlopVertical,
Expand Down

0 comments on commit 1d24ec4

Please sign in to comment.