UNPKG

tdesign-react

Version:
35 lines (29 loc) 1.12 kB
/** * tdesign v1.11.6 * (c) 2025 tdesign * @license MIT */ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var _typeof = require('../../_chunks/dep-5b35215f.js'); var require$$0 = require('react-is'); function supportRef(nodeOrComponent) { var _type$prototype, _nodeOrComponent$prot; var type = require$$0.isMemo(nodeOrComponent) ? nodeOrComponent.type.type : nodeOrComponent.type; if (typeof type === "function" && !((_type$prototype = type.prototype) !== null && _type$prototype !== void 0 && _type$prototype.render)) { return false; } if (typeof nodeOrComponent === "function" && !((_nodeOrComponent$prot = nodeOrComponent.prototype) !== null && _nodeOrComponent$prot !== void 0 && _nodeOrComponent$prot.render)) { return false; } return true; } function getRefDom(domRef) { if (domRef.current && _typeof._typeof(domRef.current) === "object" && "currentElement" in domRef.current) { return domRef.current.currentElement; } return domRef.current; } exports.getRefDom = getRefDom; exports.supportRef = supportRef; //# sourceMappingURL=ref.js.map