Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Meta
create-react-app
Commits
ac7777d5
Commit
ac7777d5
authored
7 years ago
by
Dan Abramov
Browse files
Options
Download
Email Patches
Plain Diff
Work around weird inferred name in Chrome
parent
4434467a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/react-error-overlay/src/components/frame.js
+4
-1
packages/react-error-overlay/src/components/frame.js
with
4 additions
and
1 deletion
+4
-1
packages/react-error-overlay/src/components/frame.js
+
4
-
1
View file @
ac7777d5
...
@@ -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)
'
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment