From f580de7a44efd741a81ac200adfdeafbc0b175fb Mon Sep 17 00:00:00 2001 From: Magnus Melin Date: Wed, 18 Sep 2019 09:49:30 +0300 Subject: [PATCH] Fix #2161 - don't (try to) pass window.grecaptcha.execute to expectRecaptcha which is going to wait for grecaptcha to become awailable. --- src/mixins/stripe.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/mixins/stripe.js b/src/mixins/stripe.js index 8f25dad8..cc2c3508 100644 --- a/src/mixins/stripe.js +++ b/src/mixins/stripe.js @@ -88,9 +88,10 @@ var StripeMixin = { return; } if (!window.grecaptcha) { - return setTimeout(() => { + setTimeout(() => { this.expectRecaptcha(callback); }, 100); + return; } window.grecaptcha.ready(callback); @@ -115,7 +116,9 @@ var StripeMixin = { // This is a hack to get around the reCaptcha // puzzle being shown at the top of the page. window.scrollTo(0, 0); - this.expectRecaptcha(window.grecaptcha.execute); + this.expectRecaptcha(() => { + window.grecaptcha.execute(); + }); }, stripeSubmit: function(reCaptchaToken) { var success = this.stripeSuccess;