title: Cannot prevent sweet alert from closing
body: <p>I'm trying to validate the <code>email</code> field before closing the <code>SweetAlert</code> but for some reason the <code>SweetAlert</code> is closing after catching the error:</p>
  
  <pre><code>Swal.fire({
      title: title,
      html: template,
      preConfirm: function (email) {
          email = '';
          return new Promise(function (resolve, reject) {
              setTimeout(function () {
                  if (email === '') {
                      alert("err");
                      reject('err')
                  } else {
                      resolve()
                  }
              }, 1000)
          }).catch(err =&gt; alert("error catched"))
      },
  });
  </code></pre>
  
  <p>What can I do to prevent the <code>SweetAlert</code> modal from closing when the error is caught?</p>
  
  <p>Thanks</p>