From 1343cdf037214cf61d1ba5125ad52a8e764f439a Mon Sep 17 00:00:00 2001
From: FrederikBaerentsen <frederik+gitea@baerentsen.net>
Date: Sun, 14 Apr 2024 22:36:41 +0200
Subject: [PATCH] Added downdown

---
 templates/bootstrap_table.html | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/templates/bootstrap_table.html b/templates/bootstrap_table.html
index e421c28..eef5edc 100644
--- a/templates/bootstrap_table.html
+++ b/templates/bootstrap_table.html
@@ -219,10 +219,15 @@ document.addEventListener('DOMContentLoaded', function () {
 
   lightboxTrigger.forEach(function (element) {
     element.addEventListener('click', function () {
-      const imgSrc = element.getAttribute('src');
-      const textContent = element.closest('tr').querySelector('td:nth-child(3)').textContent; // Adjust the index accordingly
-      lightboxImage.setAttribute('src', imgSrc);
+	const imgSrc = element.getAttribute('src');
+	textContent = ''
+try {
+	     textContent  = element.closest('tr').querySelector('td:nth-child(3)').textContent; // Adjust the index accordingly
       lightboxText.textContent = textContent;
+} catch (e) {
+}
+
+      lightboxImage.setAttribute('src', imgSrc);
       lightboxModal.style.display = 'block';
     });
   });