Skip to content

Commit 8ff90a1

Browse files
committed
fix(use-long-press): Prevent casting falsy cancelOnMovement values to false
1 parent eaaee56 commit 8ff90a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/use-long-press/src/lib/use-long-press.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ export function useLongPress<
209209
// First call callback to allow modifying event position
210210
onMove?.(event, { context });
211211

212-
if (cancelOnMovement && startPosition.current) {
212+
if (cancelOnMovement !== false && startPosition.current) {
213213
const currentPosition = getCurrentPosition(event);
214214

215215
if (currentPosition) {

0 commit comments

Comments
 (0)