HTML Tree: fix errors being thrown on hover over empty cells

Regression in 54ad6da1
This commit is contained in:
Adomas Venčkauskas 2022-02-08 10:00:24 +02:00
parent b865ee8b65
commit 0d2cfef160

View file

@ -865,7 +865,7 @@ class VirtualizedTable extends React.Component {
// otherwise the .cell element if its immediate child is a text node
// should be used.
if (!textElem) {
if (elem.childNodes[0].nodeType != window.Node.TEXT_NODE) return;
if (!elem.childNodes.length || elem.childNodes[0].nodeType != window.Node.TEXT_NODE) return;
textElem = elem;
}
// We need to set the [title] attribute on the .label element in the header