@@ -501,7 +501,7 @@ function createErrorChunk<T>(
501501}
502502
503503function moveDebugInfoFromChunkToInnerValue< T > (
504- chunk: InitializedChunk< T > ,
504+ chunk: InitializedChunk< T > | InitializedStreamChunk < any > ,
505505 value: T,
506506): void {
507507 // Remove the debug info from the initialized chunk, and add it to the inner
@@ -1570,6 +1570,10 @@ function fulfillReference(
15701570 initializedChunk . reason = handler . reason ; // Used by streaming chunks
15711571 if ( resolveListeners !== null ) {
15721572 wakeChunk ( resolveListeners , handler . value , initializedChunk ) ;
1573+ } else {
1574+ if ( __DEV__ ) {
1575+ moveDebugInfoFromChunkToInnerValue ( initializedChunk , handler . value ) ;
1576+ }
15731577 }
15741578 }
15751579}
@@ -1819,6 +1823,10 @@ function loadServerReference<A: Iterable<any>, T>(
18191823 initializedChunk . value = handler . value ;
18201824 if ( resolveListeners !== null ) {
18211825 wakeChunk ( resolveListeners , handler . value , initializedChunk ) ;
1826+ } else {
1827+ if ( __DEV__ ) {
1828+ moveDebugInfoFromChunkToInnerValue ( initializedChunk , handler . value ) ;
1829+ }
18221830 }
18231831 }
18241832 }
@@ -3048,6 +3056,10 @@ function resolveStream<T: ReadableStream | $AsyncIterable<any, any, void>>(
30483056 resolvedChunk.reason = controller;
30493057 if (resolveListeners !== null) {
30503058 wakeChunk ( resolveListeners , chunk . value , ( chunk : any ) ) ;
3059+ } else {
3060+ if ( __DEV__ ) {
3061+ moveDebugInfoFromChunkToInnerValue ( resolvedChunk , stream ) ;
3062+ }
30513063 }
30523064}
30533065
0 commit comments