diff --git a/scripts/pi-hole/js/index.js b/scripts/pi-hole/js/index.js index e70d856ba..329bf04d2 100644 --- a/scripts/pi-hole/js/index.js +++ b/scripts/pi-hole/js/index.js @@ -532,12 +532,12 @@ function updateTopClientsChart() { client = utils.escapeHtml(client); if (client.indexOf("|") === -1) { + clientname = client; + clientip = client; + } else { idx = client.indexOf("|"); clientname = client.substr(0, idx); clientip = client.substr(idx + 1, client.length - idx); - } else { - clientname = client; - clientip = client; } url =