fix (harmless) uncaught TypeError when viewing the download page for a single file

This commit is contained in:
xenofem 2023-11-16 21:37:15 -05:00
parent 8b001911f7
commit 1b35c93243

View file

@ -1,7 +1,9 @@
let updateInterval;
document.addEventListener("DOMContentLoaded", () => {
const table = document.getElementById("download_contents").getElementsByTagName("tbody")[0];
const downloadContents = document.getElementById("download_contents");
if (!downloadContents) { return; }
const table = downloadContents.getElementsByTagName("tbody")[0];
if (table.children.length === 0) { return; }
updateInterval = setInterval(() => {