mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-22 16:35:14 +00:00
18 lines
513 B
JavaScript
18 lines
513 B
JavaScript
"use strict";
|
|
|
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
|
|
exports.__esModule = true;
|
|
exports["default"] = safeFindDOMNode;
|
|
|
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
|
|
function safeFindDOMNode(componentOrElement) {
|
|
if (componentOrElement && 'setState' in componentOrElement) {
|
|
return _reactDom["default"].findDOMNode(componentOrElement);
|
|
}
|
|
|
|
return componentOrElement != null ? componentOrElement : null;
|
|
}
|
|
|
|
module.exports = exports.default; |