diff --git a/addons/payment_stripe/static/src/js/payment_form.js b/addons/payment_stripe/static/src/js/payment_form.js index 5ed4200a88c..311f62bfc8e 100644 --- a/addons/payment_stripe/static/src/js/payment_form.js +++ b/addons/payment_stripe/static/src/js/payment_form.js @@ -81,7 +81,9 @@ PaymentForm.include({ }).guardedCatch(function (error) { // We don't want to open the Error dialog since // we already have a container displaying the error - error.event.preventDefault(); + if (error.event) { + error.event.preventDefault(); + } // if the rpc fails, pretty obvious self.enableButton(button); self.displayError(