diff --git a/app/assets/javascripts/darkswarm/services/checkout.js.coffee b/app/assets/javascripts/darkswarm/services/checkout.js.coffee index 569382d52e2..4ec3081ad31 100644 --- a/app/assets/javascripts/darkswarm/services/checkout.js.coffee +++ b/app/assets/javascripts/darkswarm/services/checkout.js.coffee @@ -27,10 +27,12 @@ Darkswarm.factory 'Checkout', ($injector, CurrentOrder, ShippingMethods, StripeE throw error # generate a BugsnagJS alert handle_checkout_error_response: (response) => - if response.data.path + throw response unless response.data? + + if response.data.path? Navigation.go response.data.path else - throw response unless response.data.flash + throw response unless response.data.flash? @errors = response.data.errors @loadFlash(response.data.flash)