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
606c1e27c0
commit
0ee4fc2326
1 changed files with 6 additions and 2 deletions
|
@ -58,7 +58,9 @@ class CardFieldsRenderer {
|
|||
},
|
||||
onError( error ) {
|
||||
console.error( error );
|
||||
this.spinner.unblock();
|
||||
if (this.spinner) {
|
||||
this.spinner.unblock();
|
||||
}
|
||||
},
|
||||
} );
|
||||
|
||||
|
@ -105,7 +107,9 @@ class CardFieldsRenderer {
|
|||
}
|
||||
|
||||
cardFields.submit().catch( ( error ) => {
|
||||
this.spinner.unblock();
|
||||
if (this.spinner) {
|
||||
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