* Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent * instance, or null if the node was not rendered by this React.
(node)
| 2606 | * instance, or null if the node was not rendered by this React. |
| 2607 | */ |
| 2608 | function getInstanceFromNode$1(node) { |
| 2609 | var inst = node[internalInstanceKey]; |
| 2610 | if (inst) { |
| 2611 | if (inst.tag === HostComponent || inst.tag === HostText) { |
| 2612 | return inst; |
| 2613 | } else { |
| 2614 | return null; |
| 2615 | } |
| 2616 | } |
| 2617 | return null; |
| 2618 | } |
| 2619 | |
| 2620 | /** |
| 2621 | * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding |