File tree 1 file changed +8
-13
lines changed
packages/react-native/Libraries/Inspector
1 file changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -78,20 +78,15 @@ export default function ReactDevToolsOverlay({
78
78
x ,
79
79
y ,
80
80
viewData => {
81
- const { touchedViewTag, closestInstance, frame} = viewData ;
82
- if ( closestInstance != null || touchedViewTag != null ) {
83
- // We call `selectNode` for both non-fabric(viewTag) and fabric(instance),
84
- // this makes sure it works for both architectures.
85
- reactDevToolsAgent . selectNode ( findNodeHandle ( touchedViewTag ) ) ;
86
- if ( closestInstance != null ) {
87
- reactDevToolsAgent . selectNode ( closestInstance ) ;
88
- }
89
- setInspected ( {
90
- frame,
91
- } ) ;
92
- return true ;
81
+ const { frame, closestPublicInstance} = viewData ;
82
+
83
+ if ( closestPublicInstance == null ) {
84
+ return false ;
93
85
}
94
- return false ;
86
+
87
+ reactDevToolsAgent . selectNode ( closestPublicInstance ) ;
88
+ setInspected ( { frame} ) ;
89
+ return true ;
95
90
} ,
96
91
) ;
97
92
} ,
You can’t perform that action at this time.
0 commit comments