From 337d7e5c2967987e143a7f00392e0174cce5c3a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Mon, 8 Jul 2024 20:29:52 +0200 Subject: [PATCH] Don't try to fill client/domain tables if there is no data MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- scripts/pi-hole/js/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/pi-hole/js/index.js b/scripts/pi-hole/js/index.js index c5505189d..1bad4b89d 100644 --- a/scripts/pi-hole/js/index.js +++ b/scripts/pi-hole/js/index.js @@ -295,6 +295,8 @@ function updateTopClientsTable(blocked) { // Add note if there are no results (e.g. privacy mode enabled) if (jQuery.isEmptyObject(data.clients)) { clienttable.append('
- No data -
'); + overlay.hide(); + return; } // Populate table with content @@ -352,6 +354,8 @@ function updateTopDomainsTable(blocked) { // Add note if there are no results (e.g. privacy mode enabled) if (jQuery.isEmptyObject(data.domains)) { domaintable.append('
- No data -
'); + overlay.hide(); + return; } // Populate table with content