* Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent * instance, or null if the node was not rendered by this React.
(node)
| 11614 | */ |
| 11615 | |
| 11616 | function getInstanceFromNode$1(node) { |
| 11617 | var inst = node[internalInstanceKey] || node[internalContainerInstanceKey]; |
| 11618 | |
| 11619 | if (inst) { |
| 11620 | if (inst.tag === HostComponent || inst.tag === HostText || inst.tag === SuspenseComponent || inst.tag === HostRoot) { |
| 11621 | return inst; |
| 11622 | } else { |
| 11623 | return null; |
| 11624 | } |
| 11625 | } |
| 11626 | |
| 11627 | return null; |
| 11628 | } |
| 11629 | /** |
| 11630 | * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding |
| 11631 | * DOM node. |
no outgoing calls
no test coverage detected