Clear Loading spinner when exception is caught

This commit is contained in:
Luis Ramos
2020-04-14 13:50:38 +01:00
parent cdf5bcb7eb
commit 62471bf2ab
2 changed files with 5 additions and 3 deletions

View File

@@ -28,6 +28,7 @@ Darkswarm.factory 'Checkout', ($injector, CurrentOrder, ShippingMethods, StripeE
@errors = response.data.errors
RailsFlashLoader.loadFlash(response.data.flash)
catch error
Loading.clear()
RailsFlashLoader.loadFlash(error: t("checkout.failed")) # inform the user about the unexpected error
throw error # generate a BugsnagJS alert