@material-ui/popper.js
Version:
A fork of popper.js to avoid the deprecation warnings: https://github.com/mui-org/material-ui/issues/19358.
11 lines (10 loc) • 401 B
JavaScript
/**
* Returns the reference node of the reference object, or the reference object itself.
* @method
* @memberof Popper.Utils
* @param {Element|Object} reference - the reference element (the popper will be relative to this)
* @returns {Element} parent
*/
export default function getReferenceNode(reference) {
return reference && reference.referenceNode ? reference.referenceNode : reference;
}