Skip to content

Commit e98cc3b

Browse files
committed
Use function name from stack if we don't have one in the source map
This is always the case atm since we're not parsing function names from source maps yet.
1 parent 29ce849 commit e98cc3b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/react-devtools-shared/src/devtools/views/Components/StackTraceView.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ type CallSiteViewProps = {
3333
export function CallSiteView({callSite}: CallSiteViewProps): React.Node {
3434
const fetchFileWithCaching = useContext(FetchFileWithCachingContext);
3535

36-
const [, virtualURL, virtualLine, virtualColumn] = callSite;
36+
const [virtualFunctionName, virtualURL, virtualLine, virtualColumn] =
37+
callSite;
3738

3839
const symbolicatedCallSite: null | ReactFunctionLocation =
3940
fetchFileWithCaching !== null
@@ -55,7 +56,7 @@ export function CallSiteView({callSite}: CallSiteViewProps): React.Node {
5556
symbolicatedCallSite !== null ? symbolicatedCallSite : callSite;
5657
return (
5758
<div className={styles.CallSite}>
58-
{functionName}
59+
{functionName || virtualFunctionName}
5960
{' @ '}
6061
<span
6162
className={linkIsEnabled ? styles.Link : null}

0 commit comments

Comments
 (0)