File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
packages/react-error-overlay/src/components Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -101,13 +101,13 @@ function frameDiv(
101101 const frame = document . createElement ( 'div' ) ;
102102 const frameFunctionName = document . createElement ( 'div' ) ;
103103
104- let cleanedFunctionName ;
105- if ( ! functionName || functionName === 'Object.<anonymous>' ) {
106- cleanedFunctionName = '(anonymous function)' ;
107- } else {
108- cleanedFunctionName = functionName ;
104+ if ( functionName && functionName . indexOf ( 'Object.' ) === 0 ) {
105+ functionName = functionName . slice ( 'Object.' . length ) ;
109106 }
110-
107+ if ( functionName === '<anonymous>' ) {
108+ functionName = null ;
109+ }
110+ const cleanedFunctionName = functionName || '(anonymous function)' ;
111111 const cleanedUrl = url . replace ( 'webpack://' , '.' ) ;
112112
113113 if ( internalUrl ) {
You can’t perform that action at this time.
0 commit comments