fix JS error

This commit is contained in:
Daniel Hüsken 2025-02-06 11:57:13 +01:00
parent 0ee4fc2326
commit 25ad71c9b9
No known key found for this signature in database
GPG key ID: 9F732DA37FA709E8

View file

@ -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