Skip to content

Commit b485f7c

Browse files
authored
[DevTools] Don't attach filtered IO to grandparent Suspense (facebook#34916)
1 parent 2cfb221 commit b485f7c

File tree

1 file changed

+4
-1
lines changed
  • packages/react-devtools-shared/src/backend/fiber

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2862,7 +2862,10 @@ export function attach(
28622862
let parentInstance = reconcilingParent;
28632863
while (
28642864
parentInstance.kind === FILTERED_FIBER_INSTANCE &&
2865-
parentInstance.parent !== null
2865+
parentInstance.parent !== null &&
2866+
// We can't move past the parent Suspense node.
2867+
// The Suspense node holding async info must be a parent of the devtools instance (or the instance itself)
2868+
parentInstance !== parentSuspenseNode.instance
28662869
) {
28672870
parentInstance = parentInstance.parent;
28682871
}

0 commit comments

Comments
 (0)