Fix for Braintree duplicate submission check

This commit is contained in:
Hillel Coren 2018-02-21 21:09:55 +02:00
parent 0b998487d7
commit 5e8682be0a

View File

@ -37,7 +37,7 @@
onError: function(e) { onError: function(e) {
$form.find('button').prop('disabled', false); $form.find('button').prop('disabled', false);
NINJA.formIsSubmitted = false; NINJA.formIsSubmitted = false;
// Show the errors on the form // Show the errors on the form
if (e.details && e.details.invalidFieldKeys.length) { if (e.details && e.details.invalidFieldKeys.length) {
var invalidField = e.details.invalidFieldKeys[0]; var invalidField = e.details.invalidFieldKeys[0];
@ -58,7 +58,6 @@
}, },
onPaymentMethodReceived: function(e) { onPaymentMethodReceived: function(e) {
if (NINJA.formIsSubmitted) { if (NINJA.formIsSubmitted) {
event.preventDefault();
return false; return false;
} }
NINJA.formIsSubmitted = true; NINJA.formIsSubmitted = true;