@@ -141,11 +141,9 @@ import {
141
141
prepareToHydrateHostInstance ,
142
142
prepareToHydrateHostTextInstance ,
143
143
prepareToHydrateHostSuspenseInstance ,
144
- warnIfUnhydratedTailNodes ,
145
144
popHydrationState ,
146
145
resetHydrationState ,
147
146
getIsHydrating ,
148
- hasUnhydratedTailNodes ,
149
147
upgradeHydrationErrorsToRecoverable ,
150
148
} from './ReactFiberHydrationContext' ;
151
149
import {
@@ -866,18 +864,6 @@ function completeDehydratedSuspenseBoundary(
866
864
workInProgress : Fiber ,
867
865
nextState : SuspenseState | null ,
868
866
) : boolean {
869
- if (
870
- hasUnhydratedTailNodes ( ) &&
871
- ( workInProgress . mode & ConcurrentMode ) !== NoMode &&
872
- ( workInProgress . flags & DidCapture ) === NoFlags
873
- ) {
874
- warnIfUnhydratedTailNodes ( workInProgress ) ;
875
- resetHydrationState ( ) ;
876
- workInProgress . flags |= ForceClientRender | DidCapture ;
877
-
878
- return false ;
879
- }
880
-
881
867
const wasHydrated = popHydrationState ( workInProgress ) ;
882
868
883
869
if ( nextState !== null && nextState . dehydrated !== null ) {
@@ -1337,7 +1323,6 @@ function completeWork(
1337
1323
return null ;
1338
1324
}
1339
1325
case SuspenseComponent : {
1340
- popSuspenseHandler ( workInProgress ) ;
1341
1326
const nextState : null | SuspenseState = workInProgress . memoizedState ;
1342
1327
1343
1328
// Special path for dehydrated boundaries. We may eventually move this
@@ -1358,10 +1343,12 @@ function completeWork(
1358
1343
) ;
1359
1344
if ( ! fallthroughToNormalSuspensePath ) {
1360
1345
if ( workInProgress . flags & ForceClientRender ) {
1346
+ popSuspenseHandler ( workInProgress ) ;
1361
1347
// Special case. There were remaining unhydrated nodes. We treat
1362
1348
// this as a mismatch. Revert to client rendering.
1363
1349
return workInProgress ;
1364
1350
} else {
1351
+ popSuspenseHandler ( workInProgress ) ;
1365
1352
// Did not finish hydrating, either because this is the initial
1366
1353
// render or because something suspended.
1367
1354
return null ;
@@ -1371,6 +1358,8 @@ function completeWork(
1371
1358
// Continue with the normal Suspense path.
1372
1359
}
1373
1360
1361
+ popSuspenseHandler ( workInProgress ) ;
1362
+
1374
1363
if ( ( workInProgress . flags & DidCapture ) !== NoFlags ) {
1375
1364
// Something suspended. Re-render with the fallback children.
1376
1365
workInProgress . lanes = renderLanes ;
0 commit comments