@@ -399,13 +399,7 @@ function tryToClaimNextHydratableInstance(fiber: Fiber): void {
399
399
) ;
400
400
401
401
const nextInstance = nextHydratableInstance ;
402
- if ( ! nextInstance ) {
403
- if ( shouldKeepWarning ) {
404
- warnNonHydratedInstance ( ( hydrationParentFiber : any ) , fiber ) ;
405
- }
406
- throwOnHydrationMismatch ( fiber ) ;
407
- }
408
- if ( ! tryHydrateInstance ( fiber , nextInstance ) ) {
402
+ if ( ! nextInstance || ! tryHydrateInstance ( fiber , nextInstance ) ) {
409
403
if ( shouldKeepWarning ) {
410
404
warnNonHydratedInstance ( ( hydrationParentFiber : any ) , fiber ) ;
411
405
}
@@ -425,15 +419,7 @@ function tryToClaimNextHydratableTextInstance(fiber: Fiber): void {
425
419
shouldKeepWarning = validateHydratableTextInstance ( text , currentHostContext ) ;
426
420
427
421
const nextInstance = nextHydratableInstance ;
428
- if ( ! nextInstance ) {
429
- // We exclude non hydrabable text because we know there are no matching hydratables.
430
- // We either throw or insert depending on the render mode.
431
- if ( shouldKeepWarning ) {
432
- warnNonHydratedInstance ( ( hydrationParentFiber : any ) , fiber ) ;
433
- }
434
- throwOnHydrationMismatch ( fiber ) ;
435
- }
436
- if ( ! tryHydrateText ( fiber , nextInstance ) ) {
422
+ if ( ! nextInstance || ! tryHydrateText ( fiber , nextInstance ) ) {
437
423
if ( shouldKeepWarning ) {
438
424
warnNonHydratedInstance ( ( hydrationParentFiber : any ) , fiber ) ;
439
425
}
@@ -446,11 +432,7 @@ function tryToClaimNextHydratableSuspenseInstance(fiber: Fiber): void {
446
432
return ;
447
433
}
448
434
const nextInstance = nextHydratableInstance ;
449
- if ( ! nextInstance ) {
450
- warnNonHydratedInstance ( ( hydrationParentFiber : any ) , fiber ) ;
451
- throwOnHydrationMismatch ( fiber ) ;
452
- }
453
- if ( ! tryHydrateSuspense ( fiber , nextInstance ) ) {
435
+ if ( ! nextInstance || ! tryHydrateSuspense ( fiber , nextInstance ) ) {
454
436
warnNonHydratedInstance ( ( hydrationParentFiber : any ) , fiber ) ;
455
437
throwOnHydrationMismatch ( fiber ) ;
456
438
}
0 commit comments