aboutsummaryrefslogtreecommitdiffstats
path: root/npm_assets/node_modules/popper.js/src/utils/getReferenceNode.js
blob: 25f5604172a12b0c01a04fe96b702df971452036 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
/**
 * 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;
}