1 | import ReactDOM from 'react-dom';
|
2 | export default function safeFindDOMNode(componentOrElement) {
|
3 | if (componentOrElement && 'setState' in componentOrElement) {
|
4 | return ReactDOM.findDOMNode(componentOrElement);
|
5 | }
|
6 | return componentOrElement != null ? componentOrElement : null;
|
7 | } |
\ | No newline at end of file |