From 729dc268fa9450e9d5e680e809bdf4c6616b7c8b Mon Sep 17 00:00:00 2001
From: Matthew Wire <mjw@mjwconsult.co.uk>
Date: Fri, 21 Aug 2020 11:27:33 +0100
Subject: [PATCH] Fix issue with Swal notifications sometimes not showing

---
 js/civicrm_stripe.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/js/civicrm_stripe.js b/js/civicrm_stripe.js
index 44d0ba56..4fa078dc 100644
--- a/js/civicrm_stripe.js
+++ b/js/civicrm_stripe.js
@@ -212,10 +212,12 @@
           })
             .done(function (result) {
               // Handle server response (see Step 3)
+              swalClose();
               handleServerResponse(result);
             })
-            .always(function() {
+            .fail(function() {
               swalClose();
+              displayError('Unknown error', true);
             });
         }
       }
-- 
GitLab