Skip to content

Commit

Permalink
fix: Wrong condition for coordinate options (#681)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmtrKovalenko committed Jun 15, 2024
1 parent fe72d44 commit 3bb3234
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commands/realSwipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ export async function realSwipe(
options: RealSwipeOptions = {},
) {
const position =
options.x == null && options.y == null
? { x: options.x || 0, y: options.y || 0 }
typeof options.x === "number" || typeof options.y === "number"
? { x: options.x ?? 0, y: options.y ?? 0 }
: options.touchPosition;

const length = options.length ?? 10;
Expand Down

0 comments on commit 3bb3234

Please sign in to comment.