mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-10 03:30:22 +00:00
Clear Loading spinner when exception is caught
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user