Skip to content

Commit

Permalink
Don't try to fill client/domain tables if there is no data (#3069)
Browse files Browse the repository at this point in the history
  • Loading branch information
yubiuser authored Jul 8, 2024
2 parents e852fbb + 337d7e5 commit 60ca1c7
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 60ca1c7

Please sign in to comment.