From 0d2cfef160d920d2dbb4036ff2ea0e5e16b7b207 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Tue, 8 Feb 2022 10:00:24 +0200 Subject: [PATCH] HTML Tree: fix errors being thrown on hover over empty cells Regression in 54ad6da1 --- chrome/content/zotero/components/virtualized-table.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/components/virtualized-table.jsx b/chrome/content/zotero/components/virtualized-table.jsx index 3f4cc53a5e..9adbf1733b 100644 --- a/chrome/content/zotero/components/virtualized-table.jsx +++ b/chrome/content/zotero/components/virtualized-table.jsx @@ -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