From d9c03caa9b2cfa17aae655eac21b7ac23eab3597 Mon Sep 17 00:00:00 2001 From: luukas Date: Thu, 16 Jun 2022 00:19:48 +0300 Subject: [PATCH] Fix an error when there are no servers --- app/frontend/templates/panel/dashboard.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/frontend/templates/panel/dashboard.html b/app/frontend/templates/panel/dashboard.html index 34cddf63..8c215a77 100644 --- a/app/frontend/templates/panel/dashboard.html +++ b/app/frontend/templates/panel/dashboard.html @@ -835,7 +835,8 @@ "ordering": false, // false to disable sorting (or any other option) "paging": false }); - document.getElementById('first').setAttribute('draggable', false); + const first = document.querySelector('#first') + first !== null && first.setAttribute('draggable', false); $('.dataTables_length').addClass('bs-select'); }); /* Search Bar End */ @@ -908,4 +909,4 @@ -{% end %} \ No newline at end of file +{% end %}