Commit ac7777d5 authored by Dan Abramov's avatar Dan Abramov
Browse files

Work around weird inferred name in Chrome

parent 4434467a
Showing with 4 additions and 1 deletion
+4 -1
...@@ -142,7 +142,10 @@ function createFrame( ...@@ -142,7 +142,10 @@ function createFrame(
// Chrome has a bug with inferring function.name: // Chrome has a bug with inferring function.name:
// https://github.com/facebookincubator/create-react-app/issues/2097 // https://github.com/facebookincubator/create-react-app/issues/2097
// Let's ignore a meaningless name we get for top-level modules. // Let's ignore a meaningless name we get for top-level modules.
if (functionName === 'Object.friendlySyntaxErrorLabel') { if (
functionName === 'Object.friendlySyntaxErrorLabel' ||
functionName === 'Object.exports.__esModule'
) {
functionName = '(anonymous function)'; functionName = '(anonymous function)';
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment