GeezerVison is showing github.com — Check for Suspense boundary in a root Container (#16673) · react/react@e11bf42
File tree
Expand file treeCollapse file tree
Open diff view settings
packages/react-dom/src/client
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: packages/react-dom/src/client/ReactDOMComponentTree.js +4-6Lines changed: 4 additions & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -49,12 +49,10 @@ export function getClosestInstanceFromNode(targetNode) { |
49 | 49 | // instance. Note that we don't check this field on the targetNode |
50 | 50 | // itself because the fibers are conceptually between the container |
51 | 51 | // node and the first child. It isn't surrounding the container node. |
52 | | - targetInst = parentNode[internalContainerInstanceKey]; |
53 | | - if (targetInst) { |
54 | | - // If so, we return the HostRoot Fiber. |
55 | | - return targetInst; |
56 | | - } |
57 | | - targetInst = parentNode[internalInstanceKey]; |
| 52 | + // If it's not a container, we check if it's an instance. |
| 53 | + targetInst = |
| 54 | + parentNode[internalContainerInstanceKey] || |
| 55 | + parentNode[internalInstanceKey]; |
58 | 56 | if (targetInst) { |
59 | 57 | // Since this wasn't the direct target of the event, we might have |
60 | 58 | // stepped past dehydrated DOM nodes to get here. However they could |
|