'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var canUseDOM = require('../../../utils/canUseDOM.js');

var getHTMLElement = function getHTMLElement(target) {
  if (!target || !canUseDOM.canUseDOM) {
    return null;
  }
  if (typeof target === 'string') {
    return document.querySelector(target);
  }
  if ('current' in target) {
    return target.current;
  }
  return target;
};

exports.getHTMLElement = getHTMLElement;
