GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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
Filter options
  • packages/react-dom/src/client
    • ReactDOMComponentTree.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/react-dom/src/client/ReactDOMComponentTree.js‎

Copy file name to clipboardExpand all lines: packages/react-dom/src/client/ReactDOMComponentTree.js
+4-6Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,10 @@ export function getClosestInstanceFromNode(targetNode) {
4949
// instance. Note that we don't check this field on the targetNode
5050
// itself because the fibers are conceptually between the container
5151
// 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];
5856
if (targetInst) {
5957
// Since this wasn't the direct target of the event, we might have
6058
// stepped past dehydrated DOM nodes to get here. However they could

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.