Skip to content

Commit

Permalink
fix: gesture warning
Browse files Browse the repository at this point in the history
Because `GestureContainer` can be a React.Fragment, passing a `gesture` prop in that scenarios triggers a warning.
This commit ensures the `gesture` props is not passed in the scenario of a React.Fragment.
  • Loading branch information
PierreCapo committed Oct 25, 2023
1 parent a8f7bbb commit efdea0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ScrollViewGesture.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ const IScrollViewGesture: React.FC<PropsWithChildren<Props>> = (props) => {
const GestureContainer = enabled ? GestureDetector : React.Fragment;

return (
<GestureContainer gesture={gesture}>
<GestureContainer {...(enabled ? {gesture} : {})}>
<Animated.View
ref={containerRef}
testID={testID}
Expand Down

0 comments on commit efdea0e

Please sign in to comment.