Skip to content

Commit

Permalink
Don't try to fill client/domain tables if there is no data
Browse files Browse the repository at this point in the history
Signed-off-by: Christian König <[email protected]>
  • Loading branch information
yubiuser committed Jul 8, 2024
1 parent e852fbb commit 337d7e5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/pi-hole/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('<tr><td colspan="3"><center>- No data -</center></td></tr>');
overlay.hide();
return;
}

// Populate table with content
Expand Down Expand Up @@ -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('<tr><td colspan="3"><center>- No data -</center></td></tr>');
overlay.hide();
return;
}

// Populate table with content
Expand Down

0 comments on commit 337d7e5

Please sign in to comment.