mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
fix JS error
This commit is contained in:
parent
0ee4fc2326
commit
25ad71c9b9
1 changed files with 4 additions and 8 deletions
|
@ -56,11 +56,9 @@ class CardFieldsRenderer {
|
|||
onApprove( data ) {
|
||||
return contextConfig.onApprove( data );
|
||||
},
|
||||
onError( error ) {
|
||||
console.error( error );
|
||||
if (this.spinner) {
|
||||
this.spinner.unblock();
|
||||
}
|
||||
onError: ( error ) => {
|
||||
console.error( error );
|
||||
this.spinner.unblock();
|
||||
},
|
||||
} );
|
||||
|
||||
|
@ -107,9 +105,7 @@ class CardFieldsRenderer {
|
|||
}
|
||||
|
||||
cardFields.submit().catch( ( error ) => {
|
||||
if (this.spinner) {
|
||||
this.spinner.unblock();
|
||||
}
|
||||
this.spinner.unblock();
|
||||
console.error( error );
|
||||
this.errorHandler.message(
|
||||
this.defaultConfig.hosted_fields.labels.fields_not_valid
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue