findDOMNode.js
484 Bytes
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = findDOMNode;
var _reactDom = _interopRequireDefault(require("react-dom"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Return if a node is a DOM node. Else will return by `findDOMNode`
*/
function findDOMNode(node) {
if (node instanceof HTMLElement) {
return node;
}
return _reactDom.default.findDOMNode(node);
}