From 7dd6db1ea7da1704eb5b01523796020cec67a0aa Mon Sep 17 00:00:00 2001 From: Hannu Lyytikainen Date: Mon, 9 Jul 2018 15:29:29 +0300 Subject: [PATCH] Add a submit in progress check --- src/forms/StripePaymentForm/StripePaymentForm.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/forms/StripePaymentForm/StripePaymentForm.js b/src/forms/StripePaymentForm/StripePaymentForm.js index 3d064f6955..d49db25c0c 100644 --- a/src/forms/StripePaymentForm/StripePaymentForm.js +++ b/src/forms/StripePaymentForm/StripePaymentForm.js @@ -199,7 +199,7 @@ class StripePaymentForm extends Component { const classes = classNames(rootClassName || css.root, className); const cardClasses = classNames(css.card, { [css.cardSuccess]: this.state.cardValueValid, - [css.cardError]: this.state.error, + [css.cardError]: this.state.error && !submitInProgress, }); const messagePlaceholder = intl.formatMessage( @@ -240,7 +240,9 @@ class StripePaymentForm extends Component { this.cardContainer = el; }} /> - {this.state.error ? {this.state.error} : null} + {this.state.error && !submitInProgress ? ( + {this.state.error} + ) : null}