From a1139e7797996f124df4556dfc99265d13cae616 Mon Sep 17 00:00:00 2001 From: "H. C. Kruse" <6594492+octfx@users.noreply.github.com> Date: Mon, 3 Jul 2023 14:48:15 +0200 Subject: [PATCH] fix(Tables): Check if `element.parentNode` is null (#681) Happened on the recent changes table. While the added line in TableNowrapClasses also fixes this, I've left it in as a safeguard. --- resources/skins.citizen.scripts/tables.js | 4 ++++ skin.json | 1 + 2 files changed, 5 insertions(+) diff --git a/resources/skins.citizen.scripts/tables.js b/resources/skins.citizen.scripts/tables.js index 91661684..a20e54eb 100644 --- a/resources/skins.citizen.scripts/tables.js +++ b/resources/skins.citizen.scripts/tables.js @@ -38,6 +38,10 @@ function setupOverflowState( element ) { } }; + if ( element.parentNode === null ) { + return; + } + updateState(); // Update state on element scroll diff --git a/skin.json b/skin.json index 9e739a6c..6869bf34 100644 --- a/skin.json +++ b/skin.json @@ -627,6 +627,7 @@ "value": [ "citizen-table-nowrap", "mw-changeslist-line", + "mw-recentchanges-table", "infobox", "cargoDynamicTable", "dataTable"