Fixed #586 - Dropdown inside datable using showClear causing: Cannot read property 'classList' of null
parent
9b9802d838
commit
41074b0e7e
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue