* Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent * instance, or null if the node was not rendered by this React.
(node)
| 2468 | * instance, or null if the node was not rendered by this React. |
| 2469 | */ |
| 2470 | function getInstanceFromNode$1(node) { |
| 2471 | var inst = node[internalInstanceKey]; |
| 2472 | if (inst) { |
| 2473 | if (inst.tag === HostComponent || inst.tag === HostText) { |
| 2474 | return inst; |
| 2475 | } else { |
| 2476 | return null; |
| 2477 | } |
| 2478 | } |
| 2479 | return null; |
| 2480 | } |
| 2481 | |
| 2482 | /** |
| 2483 | * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding |