From a875d7447b76c1fc111575a1aa3853f271f9e753 Mon Sep 17 00:00:00 2001 From: osdnk Date: Tue, 22 Oct 2019 20:54:58 +0200 Subject: [PATCH] fix: conditions in gesture direction --- src/views/Stack/Card.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/views/Stack/Card.tsx b/src/views/Stack/Card.tsx index 1c3b0e57b..51cdf2d95 100755 --- a/src/views/Stack/Card.tsx +++ b/src/views/Stack/Card.tsx @@ -766,10 +766,14 @@ export default class Card extends React.Component { 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 {