Skip to content

Commit 2a57992

Browse files
committed
There is no single fallback Fiber
e.g. if you have a Fragment
1 parent 500a056 commit 2a57992

File tree

1 file changed

+2
-10
lines changed
  • packages/react-devtools-shared/src/backend/fiber

1 file changed

+2
-10
lines changed

packages/react-devtools-shared/src/backend/fiber/renderer.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3085,16 +3085,8 @@ export function attach(
30853085
reconcilingParentSuspenseNode = stashedSuspenseParent;
30863086
previouslyReconciledSiblingSuspenseNode = stashedSuspensePrevious;
30873087
remainingReconcilingChildrenSuspenseNodes = stashedSuspenseRemaining;
3088-
const fallbackInstance = remainingReconcilingChildren;
3089-
if (fallbackInstance !== null) {
3090-
unmountInstanceRecursively(fallbackInstance);
3091-
3092-
if (remainingReconcilingChildren !== null) {
3093-
throw new Error(
3094-
'There should be no instances left to unmount after a Suspense fallback was unmounted.',
3095-
);
3096-
}
3097-
}
3088+
// The fallback has no dedicated Fiber so all the remaining children are considered the fallback.
3089+
unmountRemainingChildren();
30983090
}
30993091
31003092
function isChildOf(

0 commit comments

Comments
 (0)