File tree Expand file tree Collapse file tree 2 files changed +5
-16
lines changed
react-devtools-shared/src/backend/shared Expand file tree Collapse file tree 2 files changed +5
-16
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ if (__DEV__) {
5151 componentFrameCache = new PossiblyWeakMap < $FlowFixMe , string > ( ) ;
5252}
5353
54- export function describeNativeComponentFrame (
54+ export function describeFunctionComponentFrame (
5555 fn : Function ,
5656 construct : boolean ,
5757 currentDispatcherRef : CurrentDispatcherRef ,
@@ -280,12 +280,5 @@ export function describeClassComponentFrame(
280280 ctor : Function ,
281281 currentDispatcherRef : CurrentDispatcherRef ,
282282) : string {
283- return describeNativeComponentFrame ( ctor , true , currentDispatcherRef ) ;
284- }
285-
286- export function describeFunctionComponentFrame (
287- fn : Function ,
288- currentDispatcherRef : CurrentDispatcherRef ,
289- ) : string {
290- return describeNativeComponentFrame ( fn , false , currentDispatcherRef ) ;
283+ return describeFunctionComponentFrame ( ctor , true , currentDispatcherRef ) ;
291284}
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ if (__DEV__) {
7070 * (3) diffing the control and sample error stacks to find the stack frame
7171 * which represents our component.
7272 */
73- export function describeNativeComponentFrame (
73+ export function describeFunctionComponentFrame (
7474 fn : Function ,
7575 construct : boolean ,
7676) : string {
@@ -291,11 +291,7 @@ export function describeNativeComponentFrame(
291291}
292292
293293export function describeClassComponentFrame ( ctor : Function ) : string {
294- return describeNativeComponentFrame ( ctor , true ) ;
295- }
296-
297- export function describeFunctionComponentFrame ( fn : Function ) : string {
298- return describeNativeComponentFrame ( fn , false ) ;
294+ return describeFunctionComponentFrame ( ctor , true ) ;
299295}
300296
301297function shouldConstruct ( Component : Function ) {
@@ -312,7 +308,7 @@ export function describeUnknownElementTypeFrameInDEV(type: any): string {
312308 return '' ;
313309 }
314310 if ( typeof type === 'function' ) {
315- return describeNativeComponentFrame ( type , shouldConstruct ( type ) ) ;
311+ return describeFunctionComponentFrame ( type , shouldConstruct ( type ) ) ;
316312 }
317313 if ( typeof type === 'string' ) {
318314 return describeBuiltInComponentFrame ( type ) ;
You can’t perform that action at this time.
0 commit comments