Skip to content
This repository has been archived by the owner on Feb 25, 2020. It is now read-only.

Commit

Permalink
fix: conditions in gesture direction
Browse files Browse the repository at this point in the history
  • Loading branch information
osdnk committed Oct 22, 2019
1 parent 909115a commit a875d74
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/views/Stack/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -766,10 +766,14 @@ export default class Card extends React.Component<Props> {
const distance =
gestureDirection === 'vertical' ||
gestureDirection === 'vertical-inverted'
? (gestureResponseDistance && gestureResponseDistance.vertical) ||
GESTURE_RESPONSE_DISTANCE_VERTICAL
: (gestureResponseDistance && gestureResponseDistance.horizontal) ||
GESTURE_RESPONSE_DISTANCE_HORIZONTAL;
? gestureResponseDistance &&
gestureResponseDistance.vertical !== undefined
? gestureResponseDistance.vertical
: GESTURE_RESPONSE_DISTANCE_VERTICAL
: gestureResponseDistance &&
gestureResponseDistance.horizontal !== undefined
? gestureResponseDistance.horizontal
: GESTURE_RESPONSE_DISTANCE_HORIZONTAL;

if (gestureDirection === 'vertical') {
return {
Expand Down

0 comments on commit a875d74

Please sign in to comment.