UNPKG

513 BJavaScriptView Raw
1"use strict";
2
3var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
5exports.__esModule = true;
6exports["default"] = safeFindDOMNode;
7
8var _reactDom = _interopRequireDefault(require("react-dom"));
9
10function safeFindDOMNode(componentOrElement) {
11 if (componentOrElement && 'setState' in componentOrElement) {
12 return _reactDom["default"].findDOMNode(componentOrElement);
13 }
14
15 return componentOrElement != null ? componentOrElement : null;
16}
17
18module.exports = exports.default;
\No newline at end of file