From c2aed5ee9228ef059a8d7e00e5bad79b0bae5ac1 Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Sat, 14 Sep 2024 22:07:04 +0200 Subject: [PATCH] WebUIs: fix some check conditions in js code Signed-off-by: Nicola Murino --- templates/common/base.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/common/base.html b/templates/common/base.html index f0236fc0..b6f2459f 100644 --- a/templates/common/base.html +++ b/templates/common/base.html @@ -313,14 +313,14 @@ explicit grant from the SFTPGo Team (support@sftpgo.com). KTUtil.onDOMContentLoaded(function () { var dismissErrorBtn = $('#id_dismiss_error_msg'); - if (dismissErrorBtn){ + if (dismissErrorBtn.length){ dismissErrorBtn.on("click", function(){ $('#errorMsg').addClass("d-none"); }); } var logoutBtn = $('#id_logout_link'); - if (logoutBtn){ + if (logoutBtn.length){ logoutBtn.on("click", function(){ doLogout(); });