Skip to content

Commit d53559a

Browse files
gaearonromaindso
authored andcommitted
Work around weird inferred name in Chrome
1 parent dd9f234 commit d53559a

File tree

1 file changed

+4
-1
lines changed
  • packages/react-error-overlay/src/components

1 file changed

+4
-1
lines changed

packages/react-error-overlay/src/components/frame.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,10 @@ function createFrame(
142142
// Chrome has a bug with inferring function.name:
143143
// https://github.com/facebookincubator/create-react-app/issues/2097
144144
// Let's ignore a meaningless name we get for top-level modules.
145-
if (functionName === 'Object.friendlySyntaxErrorLabel') {
145+
if (
146+
functionName === 'Object.friendlySyntaxErrorLabel' ||
147+
functionName === 'Object.exports.__esModule'
148+
) {
146149
functionName = '(anonymous function)';
147150
}
148151

0 commit comments

Comments
 (0)