mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 20:55:28 +00:00
JS: test for length explicitly. (#1240)
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
@@ -192,7 +192,7 @@ function testCookies() {
|
||||
}
|
||||
|
||||
$(function () {
|
||||
if (!testCookies() && $("#cookieInfo").length) {
|
||||
if (!testCookies() && $("#cookieInfo").length > 0) {
|
||||
$("#cookieInfo").show();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -225,7 +225,7 @@ $(".nav-tabs a").on("shown.bs.tab", function (e) {
|
||||
// Auto dismissal for info notifications
|
||||
$(document).ready(function () {
|
||||
var alInfo = $("#alInfo");
|
||||
if (alInfo.length) {
|
||||
if (alInfo.length > 0) {
|
||||
alInfo.delay(3000).fadeOut(2000, function () {
|
||||
alInfo.hide();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user