export function validateElement()

in src/helpers/ariaAppHider.js [53:75]


export function validateElement(appElement) {
  const el = appElement || globalElement;
  if (el) {
    return Array.isArray(el) ||
      el instanceof HTMLCollection ||
      el instanceof NodeList
      ? el
      : [el];
  } else {
    warning(
      false,
      [
        "react-modal: App element is not defined.",
        "Please use `Modal.setAppElement(el)` or set `appElement={el}`.",
        "This is needed so screen readers don't see main content",
        "when modal is opened. It is not recommended, but you can opt-out",
        "by setting `ariaHideApp={false}`."
      ].join(" ")
    );

    return [];
  }
}