Merge pull request #572 from woocommerce/PCP-623-errors-in-the-checkout-page-when

Use `hasOwnProperty` instead of `length` for checking if property exist
This commit is contained in:
Emili Castells 2022-04-06 16:51:58 +02:00 committed by GitHub
commit 1cd64cff13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -218,7 +218,8 @@ class CreditCardRenderer {
}).catch(err => {
this.spinner.unblock();
this.errorHandler.clear();
if (err.details.length > 0) {
if (err.details) {
this.errorHandler.message(err.details.map(d => `${d.issue} ${d.description}`).join('<br/>'), true);
}
});