File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
packages/react-native/Libraries/LogBox/__tests__ Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ function findLogBoxInspectorUI(node: ReadOnlyElement): InspectorUI {
117
117
// anonymous
118
118
// MockConsoleErrorForTesting <-- mockConsoleIndex
119
119
// ManualConsoleError
120
- // reactStackBottomFrame <-- react bottom frame
120
+ // react_stack_bottom_frame <-- react bottom frame
121
121
// <root>
122
122
//
123
123
// Becomes:
@@ -129,9 +129,19 @@ function getStackFrames(node: ReadOnlyElement): ?Array<string> {
129
129
const mockConsoleIndex = text . includes ( 'MockConsoleErrorForTesting' )
130
130
? text . indexOf ( 'MockConsoleErrorForTesting' ) + 1
131
131
: 0 ;
132
- const bottomFrameIndex = text . includes ( 'reactStackBottomFrame' )
133
- ? text . indexOf ( 'reactStackBottomFrame' )
134
- : text . length ;
132
+ let bottomFrameIndex = text . indexOf ( 'react_stack_bottom_frame' ) ;
133
+ if ( bottomFrameIndex === - 1 ) {
134
+ // [email protected] with @babel/plugin-transform-function-name
135
+ bottomFrameIndex = text . indexOf ( 'reactStackBottomFrame' ) ;
136
+ }
137
+ if ( bottomFrameIndex === - 1 ) {
138
+ // [email protected] without @babel/plugin-transform-function-name
139
+ bottomFrameIndex = text . indexOf ( 'react-stack-bottom-frame' ) ;
140
+ }
141
+ if ( bottomFrameIndex === - 1 ) {
142
+ bottomFrameIndex = text . length ;
143
+ }
144
+
135
145
return text . slice ( mockConsoleIndex , bottomFrameIndex ) ;
136
146
}
137
147
You can’t perform that action at this time.
0 commit comments