File tree Expand file tree Collapse file tree
packages/react-native-gesture-handler/apple Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -332,13 +332,17 @@ - (void)detachNativeGestureHandlers
332332
333333- (RNGHUIView *)tryFindGestureHandlerButton : (RNGHUIView *)inView
334334{
335- if (inView.subviews .count > 0 ) {
336- auto view = inView.subviews [0 ];
337- if ([view isKindOfClass: [RNGestureHandlerButtonComponentView class ]]) {
338- RCTViewComponentView *componentView = (RCTViewComponentView *)view;
339- if (componentView.contentView != nil ) {
340- return componentView.contentView ;
341- }
335+ if (inView.subviews .count == 0 ) {
336+ return nil ;
337+ }
338+
339+ auto view = inView.subviews [0 ];
340+
341+ if ([view isKindOfClass: [RNGestureHandlerButtonComponentView class ]]) {
342+ RCTViewComponentView *componentView = (RCTViewComponentView *)view;
343+
344+ if (componentView.contentView != nil ) {
345+ return componentView.contentView ;
342346 }
343347 }
344348
You can’t perform that action at this time.
0 commit comments