src/js/revealing-modal.js
/**
   * Gets the modal element starting from the trigger element
   *
   * @return {node} returns the modal node
   */
Gets the modal element starting from the trigger element
@return {node} returns the modal node
Gets the modal element starting from the trigger element @return { node } returns the modal node
function _getTargetModal(trigger) {
    const targetId = trigger.hasAttribute('data-target') ? trigger.getAttribute('data-target') : trigger.getAttribute('href');
    if (targetId.charAt(0) !== '#') {
      ERRORS.isNotId();
      return false;
    }
    const target = document.getElementById(targetId.slice(1));
    if (!target) {
      ERRORS.modalNotFound();
      return false;
    }
    return target;
  }
function _getTargetModal ( trigger ) { const targetId = trigger . hasAttribute ( 'data-target' ) ? trigger . getAttribute ( 'data-target' ) : trigger . getAttribute ( 'href' ) ; if ( targetId . charAt ( 0 ) !== '#' ) { ERRORS . isNotId ( ) ; return false ; } const target = document . getElementById ( targetId . slice ( 1 ) ) ; if ( ! target ) { ERRORS . modalNotFound ( ) ; return false ; } return target ; }
Gets the modal element starting from the trigger element
 @return {node} returns the modal node
Gets the modal element starting from the trigger element @return { node } returns the modal node