Commit 5c010e03 authored by Dan Abramov's avatar Dan Abramov Committed by GitHub
Browse files

Fix module function name in error overlay (#3012)

parent 5ea6de91
Showing with 6 additions and 6 deletions
+6 -6
......@@ -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) {
......
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