@@ -3099,6 +3099,9 @@ function replayElement(
30993099 if ( task . node === currentNode ) {
31003100 // This same element suspended so we need to pop the replay we just added.
31013101 task . replay = replay ;
3102+ } else {
3103+ // We finished rendering this node, so now we can consume this slot.
3104+ replayNodes . splice ( i , 1 ) ;
31023105 }
31033106 throw x ;
31043107 }
@@ -4127,6 +4130,8 @@ function renderNode(
41274130 const segment = task . blockedSegment ;
41284131 if ( segment === null ) {
41294132 // Replay
4133+ task = ( ( task : any ) : ReplayTask ) ; // Refined
4134+ const previousReplaySet : ReplaySet = task . replay ;
41304135 try {
41314136 return renderNodeDestructive ( request , task , node , childIndex ) ;
41324137 } catch ( thrownValue ) {
@@ -4166,6 +4171,7 @@ function renderNode(
41664171 task . keyPath = previousKeyPath ;
41674172 task . treeContext = previousTreeContext ;
41684173 task . componentStack = previousComponentStack ;
4174+ task . replay = previousReplaySet ;
41694175 if ( __DEV__ ) {
41704176 task . debugTask = previousDebugTask ;
41714177 }
@@ -4199,6 +4205,7 @@ function renderNode(
41994205 task.keyPath = previousKeyPath;
42004206 task.treeContext = previousTreeContext;
42014207 task.componentStack = previousComponentStack;
4208+ task.replay = previousReplaySet;
42024209 if (__DEV__) {
42034210 task . debugTask = previousDebugTask ;
42044211 }
0 commit comments