Skip to content

Commit

Permalink
length cannot be negative
Browse files Browse the repository at this point in the history
Signed-off-by: XhmikosR <[email protected]>
  • Loading branch information
XhmikosR committed Dec 26, 2019
1 parent 55bda03 commit 0034d10
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/pi-hole/js/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ function sub(index, entry, arg) {
alInfo.hide();
});
domain.remove();
if ($(list + " li").length < 1) {
if ($(list + " li").length === 0) {
$(heading).fadeOut(100);
}
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/pi-hole/js/network.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,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");
}

Expand Down

0 comments on commit 0034d10

Please sign in to comment.