File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
packages/react-devtools-shared/src/backend/fiber Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -4310,7 +4310,9 @@ export function attach(
43104310 virtualLevel + 1,
43114311 );
43124312 if ((updateFlags & ShouldResetChildren) !== NoUpdate) {
4313- recordResetChildren(virtualInstance);
4313+ if (!isInDisconnectedSubtree) {
4314+ recordResetChildren(virtualInstance);
4315+ }
43144316 updateFlags &= ~ShouldResetChildren;
43154317 }
43164318 removePreviousSuspendedBy(
@@ -5097,7 +5099,9 @@ export function attach(
50975099 // We need to crawl the subtree for closest non-filtered Fibers
50985100 // so that we can display them in a flat children set.
50995101 if (fiberInstance !== null && fiberInstance.kind === FIBER_INSTANCE) {
5100- recordResetChildren(fiberInstance);
5102+ if (!nextIsHidden && !isInDisconnectedSubtree) {
5103+ recordResetChildren(fiberInstance);
5104+ }
51015105
51025106 // We've handled the child order change for this Fiber.
51035107 // Since it's included, there's no need to invalidate parent child order.
You can’t perform that action at this time.
0 commit comments