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
5c010e03
Commit
5c010e03
authored
7 years ago
by
Dan Abramov
Committed by
GitHub
7 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Fix module function name in error overlay (#3012)
parent
5ea6de91
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/react-error-overlay/src/components/frame.js
+6
-6
packages/react-error-overlay/src/components/frame.js
with
6 additions
and
6 deletions
+6
-6
packages/react-error-overlay/src/components/frame.js
+
6
-
6
View file @
5c010e03
...
...
@@ -101,13 +101,13 @@ function frameDiv(
const
frame
=
document
.
createElement
(
'
div
'
);
const
frameFunctionName
=
document
.
createElement
(
'
div
'
);
let
cleanedFunctionName
;
if
(
!
functionName
||
functionName
===
'
Object.<anonymous>
'
)
{
cleanedFunctionName
=
'
(anonymous function)
'
;
}
else
{
cleanedFunctionName
=
functionName
;
if
(
functionName
&&
functionName
.
indexOf
(
'
Object.
'
)
===
0
)
{
functionName
=
functionName
.
slice
(
'
Object.
'
.
length
);
}
if
(
functionName
===
'
<anonymous>
'
)
{
functionName
=
null
;
}
const
cleanedFunctionName
=
functionName
||
'
(anonymous function)
'
;
const
cleanedUrl
=
url
.
replace
(
'
webpack://
'
,
'
.
'
);
if
(
internalUrl
)
{
...
...
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