File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
packages/react-client/src Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -3471,6 +3471,26 @@ function resolveDebugModel(
34713471 debugChunk . _debugChunk = previousChunk ; // Linked list of the debug chunks
34723472 parentChunk . _debugChunk = debugChunk ;
34733473 initializeDebugChunk ( response , parentChunk ) ;
3474+ if (
3475+ __DEV__ &&
3476+ ( ( debugChunk : any ) : SomeChunk < any > ) . status === BLOCKED &&
3477+ // TODO: This should check for the existence of the "readable" side, not the "writable".
3478+ response . _debugChannel === undefined
3479+ ) {
3480+ if ( json [ 0 ] === '"' && json [ 1 ] === '$' ) {
3481+ const path = json . slice ( 2 , json . length - 1 ) . split ( ':' ) ;
3482+ const outlinedId = parseInt ( path [ 0 ] , 16 ) ;
3483+ const chunk = getChunk ( response , outlinedId ) ;
3484+ if ( chunk . status === PENDING ) {
3485+ // We expect the debug chunk to have been emitted earlier in the stream. It might be
3486+ // blocked on other things but chunk should no longer be pending.
3487+ // If it's still pending that suggests that it was referencing an object in the debug
3488+ // channel, but no debug channel was wired up so it's missing. In this case we can just
3489+ // drop the debug info instead of halting the whole stream.
3490+ parentChunk. _debugChunk = null ;
3491+ }
3492+ }
3493+ }
34743494}
34753495
34763496let currentOwnerInDEV : null | ReactComponentInfo = null ;
You can’t perform that action at this time.
0 commit comments