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
3 merge requests!12191Lim.Pisey.168:/Identified - We are currently investigating reports of missing build logs. The issue has been identified and a resolution is in progress. We will provide a further update when available.Mar 21, 09:02 UTC,!12853brikk,!5717Automatically extract project file structure from build bundle file
Showing with 6 additions and 6 deletions
+6 -6
...@@ -101,13 +101,13 @@ function frameDiv( ...@@ -101,13 +101,13 @@ function frameDiv(
const frame = document.createElement('div'); const frame = document.createElement('div');
const frameFunctionName = document.createElement('div'); const frameFunctionName = document.createElement('div');
let cleanedFunctionName; if (functionName && functionName.indexOf('Object.') === 0) {
if (!functionName || functionName === 'Object.<anonymous>') { functionName = functionName.slice('Object.'.length);
cleanedFunctionName = '(anonymous function)';
} else {
cleanedFunctionName = functionName;
} }
if (functionName === '<anonymous>') {
functionName = null;
}
const cleanedFunctionName = functionName || '(anonymous function)';
const cleanedUrl = url.replace('webpack://', '.'); const cleanedUrl = url.replace('webpack://', '.');
if (internalUrl) { 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