Skip to content

Commit 57eee57

Browse files
committed
Unshift instead of push debug info
1 parent bbfef70 commit 57eee57

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/react-client/src/ReactFlightClient.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,10 @@ function moveDebugInfoFromChunkToInnerValue<T>(
518518
const debugInfo = chunk._debugInfo.splice(0);
519519
if (isArray(resolvedValue._debugInfo)) {
520520
// $FlowFixMe[method-unbinding]
521-
resolvedValue._debugInfo.push.apply(resolvedValue._debugInfo, debugInfo);
521+
resolvedValue._debugInfo.unshift.apply(
522+
resolvedValue._debugInfo,
523+
debugInfo,
524+
);
522525
} else {
523526
Object.defineProperty((resolvedValue: any), '_debugInfo', {
524527
configurable: false,
@@ -1213,7 +1216,7 @@ function initializeElement(
12131216
const debugInfo = lazyNode._debugInfo.splice(0);
12141217
if (element._debugInfo) {
12151218
// $FlowFixMe[method-unbinding]
1216-
element._debugInfo.push.apply(element._debugInfo, debugInfo);
1219+
element._debugInfo.unshift.apply(element._debugInfo, debugInfo);
12171220
} else {
12181221
Object.defineProperty(element, '_debugInfo', {
12191222
configurable: false,

0 commit comments

Comments
 (0)