Fix error handler clear messages

This commit is contained in:
dinamiko 2021-11-24 17:13:31 +01:00
parent 2638486331
commit 0ac3dae104

View file

@ -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 );
}
}
}