From 25af37509e2182be929f1f9c8b71d22ff52af6b6 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 20 Dec 2019 19:12:46 +0200 Subject: [PATCH] length cannot be negative Signed-off-by: XhmikosR --- scripts/pi-hole/js/list.js | 2 +- scripts/pi-hole/js/network.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/pi-hole/js/list.js b/scripts/pi-hole/js/list.js index 57bcdbb5..932515cc 100644 --- a/scripts/pi-hole/js/list.js +++ b/scripts/pi-hole/js/list.js @@ -153,7 +153,7 @@ function sub(index, entry, arg) { alInfo.hide(); }); domain.remove(); - if($(list+" li").length < 1) + if($(list+" li").length === 0) { $(heading).fadeOut(100); } diff --git a/scripts/pi-hole/js/network.js b/scripts/pi-hole/js/network.js index 3d82fa11..9e1f63be 100644 --- a/scripts/pi-hole/js/network.js +++ b/scripts/pi-hole/js/network.js @@ -102,7 +102,7 @@ $(document).ready(function() { } // Set hostname to "N/A" if not available - if(!data.name || data.name.length < 1) + if(!data.name || data.name.length === 0) { $("td:eq(3)", row).html("N/A"); }