Skip to content

Commit 08c3952

Browse files
committed
chore: reformat code
1 parent 79fd398 commit 08c3952

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/fireEvent.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,13 @@ function isEventEnabled(
6464
eventName: string,
6565
nearestTouchResponder?: ReactTestInstance
6666
) {
67-
if (isTextInput(element)) return element?.props.editable !== false;
68-
if (!isPointerEventEnabled(element) && isTouchEvent(eventName)) return false;
67+
if (isTextInput(element)) {
68+
return element.props.editable !== false;
69+
}
70+
71+
if (isTouchEvent(eventName) && !isPointerEventEnabled(element)) {
72+
return false;
73+
}
6974

7075
const touchStart = nearestTouchResponder?.props.onStartShouldSetResponder?.();
7176
const touchMove = nearestTouchResponder?.props.onMoveShouldSetResponder?.();

0 commit comments

Comments
 (0)