mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 13:44:42 +08:00
Fix js error
This commit is contained in:
parent
729251495f
commit
04bc1ba37f
1 changed files with 1 additions and 1 deletions
|
@ -131,7 +131,7 @@ class CreditCardRenderer {
|
||||||
return event.fields[key].isValid;
|
return event.fields[key].isValid;
|
||||||
});
|
});
|
||||||
|
|
||||||
const className = this._cardNumberFiledCLassNameByCardType(event.cards[0].type);
|
const className = event.cards.length ? this._cardNumberFiledCLassNameByCardType(event.cards[0].type) : '';
|
||||||
event.fields.number.isValid
|
event.fields.number.isValid
|
||||||
? cardNumber.classList.add(className)
|
? cardNumber.classList.add(className)
|
||||||
: this._recreateElementClassAttribute(cardNumber, cardNumberField.className);
|
: this._recreateElementClassAttribute(cardNumber, cardNumberField.className);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue