diff options
author | Alexander Moisseev <moiseev@mezonplus.ru> | 2018-09-15 18:09:47 +0300 |
---|---|---|
committer | Alexander Moisseev <moiseev@mezonplus.ru> | 2018-09-15 18:09:47 +0300 |
commit | 458642949a14fdabe5c85696f1ee23d50695d07f (patch) | |
tree | 2e3120d0bfbfb53dc4e88980d51774c6244b0af2 /interface/js/app/history.js | |
parent | e5a73f26fd6cc2c98c53d06cc5998a913da03cc1 (diff) | |
download | rspamd-458642949a14fdabe5c85696f1ee23d50695d07f.tar.gz rspamd-458642949a14fdabe5c85696f1ee23d50695d07f.zip |
[Minor] Initialize variables at declaration
Diffstat (limited to 'interface/js/app/history.js')
-rw-r--r-- | interface/js/app/history.js | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/interface/js/app/history.js b/interface/js/app/history.js index 48f2220fe..16d4b49d2 100644 --- a/interface/js/app/history.js +++ b/interface/js/app/history.js @@ -30,7 +30,7 @@ define(["jquery", "footable", "humanize"], var rows_per_page = 25; var ui = {}; - var prevVersion; + var prevVersion = null; var htmlEscapes = { "&": "&", "<": "<", @@ -99,12 +99,9 @@ define(["jquery", "footable", "humanize"], item.action = "<div style='font-size:11px' class='label label-info'>" + item.action + "</div>"; } - var score_content; - if (item.score < item.required_score) { - score_content = "<span class='text-success'>" + item.score.toFixed(2) + " / " + item.required_score + "</span>"; - } else { - score_content = "<span class='text-danger'>" + item.score.toFixed(2) + " / " + item.required_score + "</span>"; - } + var score_content = (item.score < item.required_score) + ? "<span class='text-success'>" + item.score.toFixed(2) + " / " + item.required_score + "</span>" + : "<span class='text-danger'>" + item.score.toFixed(2) + " / " + item.required_score + "</span>"; item.score = { options: { @@ -159,7 +156,7 @@ define(["jquery", "footable", "humanize"], preprocess_item(item); Object.keys(item.symbols).map(function (key) { - var str; + var str = null; var sym = item.symbols[key]; if (sym.description) { |