Skip to content

Commit ebad34c

Browse files
committed
Don't serialize chunk ids for Console rows
1 parent 7d5492c commit ebad34c

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

packages/react-server/src/ReactFlightServer.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,8 @@ function patchConsole(consoleInst: typeof console, methodName: string) {
213213
1,
214214
);
215215
request.pendingChunks++;
216-
// We don't currently use this id for anything but we emit it so that we can later
217-
// refer to previous logs in debug info to associate them with a component.
218-
const id = request.nextChunkId++;
219216
const owner: null | ReactComponentInfo = resolveOwner();
220-
emitConsoleChunk(request, id, methodName, owner, stack, arguments);
217+
emitConsoleChunk(request, methodName, owner, stack, arguments);
221218
}
222219
// $FlowFixMe[prop-missing]
223220
return originalMethod.apply(this, arguments);
@@ -3763,7 +3760,6 @@ function outlineConsoleValue(
37633760

37643761
function emitConsoleChunk(
37653762
request: Request,
3766-
id: number,
37673763
methodName: string,
37683764
owner: null | ReactComponentInfo,
37693765
stackTrace: ReactStackTrace,
@@ -3827,7 +3823,7 @@ function emitConsoleChunk(
38273823
replacer,
38283824
);
38293825
}
3830-
const row = serializeRowHeader('W', id) + json + '\n';
3826+
const row = ':W' + json + '\n';
38313827
const processedChunk = stringToChunk(row);
38323828
request.completedRegularChunks.push(processedChunk);
38333829
}

0 commit comments

Comments
 (0)