Skip to content

Commit 9f6cb60

Browse files
author
pierrezimmermann
committed
refactor: use optional chaining
1 parent c8ad5bf commit 9f6cb60

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/user-event/press/press.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ const triggerPressEvent = async (
9090
const isEnabledTouchResponder = (element: ReactTestInstance) => {
9191
return (
9292
isPointerEventEnabled(element) &&
93-
element.props.onStartShouldSetResponder &&
94-
element.props.onStartShouldSetResponder()
93+
element.props.onStartShouldSetResponder?.()
9594
);
9695
};
9796

0 commit comments

Comments
 (0)