We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef280be commit 15ee6caCopy full SHA for 15ee6ca
packages/react-reconciler/src/ReactFiberHydrationContext.js
@@ -404,11 +404,10 @@ function skipPastDehydratedSuspenseInstance(
404
let suspenseState: null | SuspenseState = fiber.memoizedState;
405
let suspenseInstance: null | SuspenseInstance =
406
suspenseState !== null ? suspenseState.dehydrated : null;
407
- invariant(
408
- suspenseInstance,
409
- 'Expected to have a hydrated suspense instance. ' +
410
- 'This error is likely caused by a bug in React. Please file an issue.',
411
- );
+ if (suspenseInstance === null) {
+ // This Suspense boundary was hydrated without a match.
+ return nextHydratableInstance;
+ }
412
return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance);
413
}
414
0 commit comments