title: SweetAlert2 Cancel button not working properly
body: <p>I have a Yes and No button in my <a href="https://sweetalert2.github.io/" rel="nofollow noreferrer">SweetAlert2</a>. When I click on No it does a post to a method but I just want it to close the SweetAlert. </p>
  
  <p>Here is the code I have written:</p>
  
  <pre><code>   $('.js-update-details-click').click(function () {
  
          var Id = Number($(this).data('result-id'));
  
          swal({
              title: 'Are you sure you want to ask the User to update their details?',
              type: 'warning',
              showCancelButton: true,
              closeOnConfirm: false,
              confirmButtonColor: '#3085d6',
              cancelButtonColor: '#d33',
              confirmButtonText: 'Yes',
              cancelButtonText: 'No',
              confirmButtonClass: 'btn btn-success btn-full-width mar-bot-5',
              cancelButtonClass: 'btn btn-danger btn-full-width mar-bot-5',
              buttonsStyling: false
          })
              .then(function (isconfirm) {
                  if (isconfirm) {
                      $.ajax({
                          type: "POST",
                          url: '/Common/ComposeUpdateDetailsEmail',
                          data: { ReplyType: 'CleanUpdateDetails', Id: Id },
                          success: function (data) {
                              swal('User has been sent an email to Update their Details.')
                          }
                      });
                  }
              });
      }
      );
  </code></pre>