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

Commit a875d74

Browse files
committed
fix: conditions in gesture direction
1 parent 909115a commit a875d74

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/views/Stack/Card.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -766,10 +766,14 @@ export default class Card extends React.Component<Props> {
766766
const distance =
767767
gestureDirection === 'vertical' ||
768768
gestureDirection === 'vertical-inverted'
769-
? (gestureResponseDistance && gestureResponseDistance.vertical) ||
770-
GESTURE_RESPONSE_DISTANCE_VERTICAL
771-
: (gestureResponseDistance && gestureResponseDistance.horizontal) ||
772-
GESTURE_RESPONSE_DISTANCE_HORIZONTAL;
769+
? gestureResponseDistance &&
770+
gestureResponseDistance.vertical !== undefined
771+
? gestureResponseDistance.vertical
772+
: GESTURE_RESPONSE_DISTANCE_VERTICAL
773+
: gestureResponseDistance &&
774+
gestureResponseDistance.horizontal !== undefined
775+
? gestureResponseDistance.horizontal
776+
: GESTURE_RESPONSE_DISTANCE_HORIZONTAL;
773777

774778
if (gestureDirection === 'vertical') {
775779
return {

0 commit comments

Comments
 (0)