Fixed #586 - Dropdown inside datable using showClear causing: Cannot read property 'classList' of null

pull/590/head
Cagatay Civici 2020-10-21 13:58:07 +03:00
parent 9b9802d838
commit 41074b0e7e
1 changed files with 8 additions and 4 deletions

View File

@ -143,10 +143,14 @@ export default class DomHandler {
}
static hasClass(element, className) {
if (element.classList)
return element.classList.contains(className);
else
return new RegExp('(^| )' + className + '( |$)', 'gi').test(element.className);
if (element) {
if (element.classList)
return element.classList.contains(className);
else
return new RegExp('(^| )' + className + '( |$)', 'gi').test(element.className);
}
return false;
}
static find(element, selector) {