@@ -406,13 +406,7 @@ function tryToClaimNextHydratableInstance(fiber: Fiber): void {
406
406
) ;
407
407
408
408
const nextInstance = nextHydratableInstance ;
409
- if ( ! nextInstance ) {
410
- if ( shouldKeepWarning ) {
411
- warnNonHydratedInstance ( ( hydrationParentFiber : any ) , fiber ) ;
412
- }
413
- throwOnHydrationMismatch ( fiber ) ;
414
- }
415
- if ( ! tryHydrateInstance ( fiber , nextInstance ) ) {
409
+ if ( ! nextInstance || ! tryHydrateInstance ( fiber , nextInstance ) ) {
416
410
if ( shouldKeepWarning ) {
417
411
warnNonHydratedInstance ( ( hydrationParentFiber : any ) , fiber ) ;
418
412
}
@@ -432,15 +426,7 @@ function tryToClaimNextHydratableTextInstance(fiber: Fiber): void {
432
426
shouldKeepWarning = validateHydratableTextInstance ( text , currentHostContext ) ;
433
427
434
428
const nextInstance = nextHydratableInstance ;
435
- if ( ! nextInstance ) {
436
- // We exclude non hydrabable text because we know there are no matching hydratables.
437
- // We either throw or insert depending on the render mode.
438
- if ( shouldKeepWarning ) {
439
- warnNonHydratedInstance ( ( hydrationParentFiber : any ) , fiber ) ;
440
- }
441
- throwOnHydrationMismatch ( fiber ) ;
442
- }
443
- if ( ! tryHydrateText ( fiber , nextInstance ) ) {
429
+ if ( ! nextInstance || ! tryHydrateText ( fiber , nextInstance ) ) {
444
430
if ( shouldKeepWarning ) {
445
431
warnNonHydratedInstance ( ( hydrationParentFiber : any ) , fiber ) ;
446
432
}
@@ -453,11 +439,7 @@ function tryToClaimNextHydratableSuspenseInstance(fiber: Fiber): void {
453
439
return ;
454
440
}
455
441
const nextInstance = nextHydratableInstance ;
456
- if ( ! nextInstance ) {
457
- warnNonHydratedInstance ( ( hydrationParentFiber : any ) , fiber ) ;
458
- throwOnHydrationMismatch ( fiber ) ;
459
- }
460
- if ( ! tryHydrateSuspense ( fiber , nextInstance ) ) {
442
+ if ( ! nextInstance || ! tryHydrateSuspense ( fiber , nextInstance ) ) {
461
443
warnNonHydratedInstance ( ( hydrationParentFiber : any ) , fiber ) ;
462
444
throwOnHydrationMismatch ( fiber ) ;
463
445
}
0 commit comments