Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion packages/react-server/src/ReactFlightServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4493,14 +4493,20 @@ function outlineIOInfo(request: Request, ioInfo: ReactIOInfo): void {
} else {
debugStack = ioInfo.stack;
}
let env = ioInfo.env;
if (env == null) {
// If we're forwarding IO info from this environment, an empty env is effectively the "client" side.
// The "client" from the perspective of our client will be this current environment.
env = (0, request.environmentName)();
}
emitIOInfoChunk(
request,
id,
ioInfo.name,
ioInfo.start,
ioInfo.end,
ioInfo.value,
ioInfo.env,
env,
owner,
debugStack,
);
Expand Down Expand Up @@ -5388,6 +5394,11 @@ function forwardDebugInfo(
if (info.env != null) {
// $FlowFixMe[cannot-write]
debugAsyncInfo.env = info.env;
} else {
// If we're forwarding IO info from this environment, an empty env is effectively the "client" side.
// The "client" from the perspective of our client will be this current environment.
// $FlowFixMe[cannot-write]
debugAsyncInfo.env = (0, request.environmentName)();
}
if (info.owner != null) {
// $FlowFixMe[cannot-write]
Expand Down
Loading
Loading