File tree 1 file changed +9
-6
lines changed
packages/react-error-overlay/src/containers
1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -91,13 +91,16 @@ class StackFrame extends Component {
91
91
} = frame ;
92
92
93
93
// TODO: find a better place for this.
94
- // Chrome has a bug with inferring function.name:
95
- // https://github.com/facebookincubator/create-react-app/issues/2097
96
- // Let's ignore a meaningless name we get for top-level modules.
94
+ if ( functionName && functionName . indexOf ( 'Object.' ) === 0 ) {
95
+ functionName = functionName . slice ( 'Object.' . length ) ;
96
+ }
97
97
if (
98
- functionName === 'Object.friendlySyntaxErrorLabel' ||
99
- functionName === 'Object.exports.__esModule' ||
100
- functionName === 'Object.<anonymous>' ||
98
+ // Chrome has a bug with inferring function.name:
99
+ // https://github.com/facebookincubator/create-react-app/issues/2097
100
+ // Let's ignore a meaningless name we get for top-level modules.
101
+ functionName === 'friendlySyntaxErrorLabel' ||
102
+ functionName === 'exports.__esModule' ||
103
+ functionName === '<anonymous>' ||
101
104
! functionName
102
105
) {
103
106
functionName = '(anonymous function)' ;
You can’t perform that action at this time.
0 commit comments