Skip to content

Commit

Permalink
whoops, got this boolean condition wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
acheronfail committed Sep 14, 2024
1 parent fae1811 commit fae1134
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/Chart.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
const ontouchstart: TouchEventHandler<SVGSVGElement> = (e) => (touchStartX = e.touches[0].clientX);
const ontouchmove: TouchEventHandler<SVGSVGElement> = (e) => {
const { clientX } = e.touches[0];
if (touchStartX !== Infinity || Math.abs(touchStartX - clientX) > touchXThreshold) {
if (touchStartX === Infinity || Math.abs(touchStartX - clientX) > touchXThreshold) {
selectPoint(clientX);
touchStartX = Infinity;
}
Expand Down

0 comments on commit fae1134

Please sign in to comment.