mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Fix error handler clear messages
This commit is contained in:
parent
2638486331
commit
0ac3dae104
1 changed files with 5 additions and 3 deletions
|
@ -73,11 +73,13 @@ class ErrorHandler {
|
|||
|
||||
clear()
|
||||
{
|
||||
if (! this.wrapper.classList.contains('woocommerce-error')) {
|
||||
if (this.messagesList === null) {
|
||||
return;
|
||||
}
|
||||
this.wrapper.classList.remove('woocommerce-error');
|
||||
this.wrapper.innerText = '';
|
||||
|
||||
while( this.messagesList.firstChild ){
|
||||
this.messagesList.removeChild( this.messagesList.firstChild );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue