Skip to content

Commit

Permalink
filter out data with empty content
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahfossheim committed Jan 16, 2025
1 parent 062bf5b commit f664a28
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/js/techreport/tableLinked.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '';
Expand Down Expand Up @@ -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 => {
Expand Down

0 comments on commit f664a28

Please sign in to comment.