From f664a28aa5de8f2078d08d0bd94500c47d90de5c Mon Sep 17 00:00:00 2001 From: Sarah Fossheim Date: Thu, 16 Jan 2025 02:11:18 +0100 Subject: [PATCH] filter out data with empty content --- src/js/techreport/tableLinked.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/js/techreport/tableLinked.js b/src/js/techreport/tableLinked.js index 50dd79b5..88176d3c 100644 --- a/src/js/techreport/tableLinked.js +++ b/src/js/techreport/tableLinked.js @@ -26,6 +26,8 @@ class TableLinked { this.dataArray = Object.values(this.data); } + this.dataArray = this.dataArray.filter(row => row.length > 0); + if(tbody) { // Reset what's in the table before adding new content tbody.innerHTML = ''; @@ -69,7 +71,7 @@ class TableLinked { } if(timestamp) { - timestamp.textContent = this.dataArray[1]?.[0].date; + timestamp.textContent = this.dataArray[1]?.[0]?.date; } this.dataArray.forEach(technology => {