File tree 1 file changed +6
-6
lines changed
packages/react-error-overlay/src/components
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -101,13 +101,13 @@ function frameDiv(
101
101
const frame = document . createElement ( 'div' ) ;
102
102
const frameFunctionName = document . createElement ( 'div' ) ;
103
103
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 ) ;
109
106
}
110
-
107
+ if ( functionName === '<anonymous>' ) {
108
+ functionName = null ;
109
+ }
110
+ const cleanedFunctionName = functionName || '(anonymous function)' ;
111
111
const cleanedUrl = url . replace ( 'webpack://' , '.' ) ;
112
112
113
113
if ( internalUrl ) {
You can’t perform that action at this time.
0 commit comments