From: Alexander Moisseev Date: Wed, 11 Jul 2018 08:47:31 +0000 (+0300) Subject: [WebUI] Initialize variables at declaration X-Git-Tag: 1.7.8~5^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=01ab7eaa51df70adc6cd1e9d9e34d00957c2357a;p=rspamd.git [WebUI] Initialize variables at declaration --- diff --git a/interface/js/app/stats.js b/interface/js/app/stats.js index 25e061783..19b1d72a7 100644 --- a/interface/js/app/stats.js +++ b/interface/js/app/stats.js @@ -104,8 +104,8 @@ define(["jquery", "d3pie", "humanize"], $("#clusterTable tbody").empty(); $("#selSrv").empty(); $.each(servers, function (key, val) { - var glyph_status; - var short_id; + var glyph_status = "glyphicon glyphicon-remove-circle"; + var short_id = "???"; if (!("config_id" in val.data)) { val.data.config_id = ""; } @@ -113,10 +113,6 @@ define(["jquery", "d3pie", "humanize"], glyph_status = "glyphicon glyphicon-ok-circle"; short_id = val.data.config_id.substring(0, 8); } - else { - glyph_status = "glyphicon glyphicon-remove-circle"; - short_id = "???"; - } $("#clusterTable tbody").append("" + "" +