Skip to content

Commit

Permalink
instead of testing if xy values are false, see if they are undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
Urmit Patel committed Aug 17, 2020
1 parent 572708e commit d3cdbfc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ lib
dist
examples/static
coverage
package-lock.json
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ function getHandlers(
const onMove = (event: HandledEvents) => {
set((state, props) => {
if (
!state.xy[0] ||
!state.xy[1] ||
state.xy[0] === undefined ||
state.xy[1] === undefined ||
("touches" in event && event.touches.length > 1)
) {
return state;
Expand Down

0 comments on commit d3cdbfc

Please sign in to comment.