File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
packages/react-devtools-shared/src/devtools/views/Components Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -104,11 +104,15 @@ function SuspendedByRow({
104104 // Only show the awaited stack if the I/O started in a different owner
105105 // than where it was awaited. If it's started by the same component it's
106106 // probably easy enough to infer and less noise in the common case.
107+ const canShowAwaitStack =
108+ ( asyncInfo . stack !== null && asyncInfo . stack . length > 0 ) ||
109+ ( asyncOwner !== null && asyncOwner . id !== inspectedElement . id ) ;
107110 const showAwaitStack =
108- ! showIOStack ||
109- ( ioOwner === null
110- ? asyncOwner !== null
111- : asyncOwner === null || ioOwner . id !== asyncOwner . id ) ;
111+ canShowAwaitStack &&
112+ ( ! showIOStack ||
113+ ( ioOwner === null
114+ ? asyncOwner !== null
115+ : asyncOwner === null || ioOwner . id !== asyncOwner . id ) ) ;
112116
113117 const value : any = ioInfo . value ;
114118 const metaName =
You can’t perform that action at this time.
0 commit comments