Skip to content

Commit 89217f0

Browse files
committed
Use the inner unfiltered Promise's stack as the best stack describing I/O
1 parent 4bef8fa commit 89217f0

File tree

2 files changed

+117
-73
lines changed

2 files changed

+117
-73
lines changed

packages/react-server/src/ReactFlightServer.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1935,6 +1935,10 @@ function visitAsyncNode(
19351935
ioNode.end = node.end;
19361936
}
19371937
match = ioNode;
1938+
} else if (ioNode.tag === PROMISE_NODE) {
1939+
// If the ioNode was a Promise, then that means we found one in user space since otherwise
1940+
// we would've returned an IO node. We assume this has the best stack.
1941+
match = ioNode;
19381942
} else {
19391943
match = node;
19401944
}

0 commit comments

Comments
 (0)