* Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent * instance, or null if the node was not rendered by this React.
(node)
| 2503 | * instance, or null if the node was not rendered by this React. |
| 2504 | */ |
| 2505 | function getInstanceFromNode$1(node) { |
| 2506 | var inst = node[internalInstanceKey]; |
| 2507 | if (inst) { |
| 2508 | if (inst.tag === HostComponent || inst.tag === HostText) { |
| 2509 | return inst; |
| 2510 | } else { |
| 2511 | return null; |
| 2512 | } |
| 2513 | } |
| 2514 | return null; |
| 2515 | } |
| 2516 | |
| 2517 | /** |
| 2518 | * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding |