@@ -4153,7 +4153,10 @@ function renderNode(
41534153        // $FlowFixMe[method-unbinding] 
41544154        if  ( typeof  x . then  ===  'function' )  { 
41554155          const  wakeable : Wakeable  =  ( x : any ) ; 
4156-           const  thenableState  =  getThenableStateAfterSuspending ( ) ; 
4156+           const  thenableState  = 
4157+             thrownValue  ===  SuspenseException 
4158+               ? getThenableStateAfterSuspending ( ) 
4159+               : null ; 
41574160          const  newTask  =  spawnNewSuspendedReplayTask ( 
41584161            request , 
41594162            // $FlowFixMe: Refined. 
@@ -4186,7 +4189,10 @@ function renderNode(
41864189          // performance but it can lead to stack overflows in extremely deep trees. 
41874190          // We do have the ability to create a trampoile if this happens which makes 
41884191          // this kind of zero-cost. 
4189-           const  thenableState  =  getThenableStateAfterSuspending ( ) ; 
4192+           const  thenableState  = 
4193+             thrownValue  ===  SuspenseException 
4194+               ? getThenableStateAfterSuspending ( ) 
4195+               : null ; 
41904196          const  newTask  =  spawnNewSuspendedReplayTask ( 
41914197            request , 
41924198            // $FlowFixMe: Refined. 
@@ -4246,7 +4252,10 @@ function renderNode(
42464252        // $FlowFixMe[method-unbinding] 
42474253        if  ( typeof  x . then  ===  'function' ) { 
42484254          const  wakeable : Wakeable  =  ( x : any ) ; 
4249-           const  thenableState  =  getThenableStateAfterSuspending ( ) ; 
4255+           const  thenableState  = 
4256+             thrownValue  ===  SuspenseException 
4257+               ? getThenableStateAfterSuspending ( ) 
4258+               : null ; 
42504259          const  newTask  =  spawnNewSuspendedRenderTask ( 
42514260            request , 
42524261            // $FlowFixMe: Refined. 
@@ -4317,7 +4326,10 @@ function renderNode(
43174326          // performance but it can lead to stack overflows in extremely deep trees. 
43184327          // We do have the ability to create a trampoile if this happens which makes 
43194328          // this kind of zero-cost. 
4320-           const  thenableState  =  getThenableStateAfterSuspending ( ) ; 
4329+           const  thenableState  = 
4330+             thrownValue  ===  SuspenseException 
4331+               ? getThenableStateAfterSuspending ( ) 
4332+               : null ; 
43214333          const  newTask  =  spawnNewSuspendedRenderTask ( 
43224334            request , 
43234335            // $FlowFixMe: Refined. 
@@ -5233,7 +5245,10 @@ function retryRenderTask(
52335245      if  ( typeof  x . then  ===  'function' )  { 
52345246        // Something suspended again, let's pick it back up later. 
52355247        segment . status  =  PENDING ; 
5236-         task . thenableState  =  getThenableStateAfterSuspending ( ) ; 
5248+         task . thenableState  = 
5249+           thrownValue  ===  SuspenseException 
5250+             ? getThenableStateAfterSuspending ( ) 
5251+             : null ; 
52375252        const  ping  =  task . ping ; 
52385253        // We've asserted that x is a thenable above 
52395254        ( x : any ) . then ( ping ,  ping ) ; 
@@ -5338,7 +5353,10 @@ function retryReplayTask(request: Request, task: ReplayTask): void {
53385353        // Something suspended again, let's pick it back up later. 
53395354        const  ping  =  task . ping ; 
53405355        x . then ( ping ,  ping ) ; 
5341-         task . thenableState  =  getThenableStateAfterSuspending ( ) ; 
5356+         task . thenableState  = 
5357+           thrownValue  ===  SuspenseException 
5358+             ? getThenableStateAfterSuspending ( ) 
5359+             : null ; 
53425360        return ; 
53435361      } 
53445362    } 
0 commit comments