From 458642949a14fdabe5c85696f1ee23d50695d07f Mon Sep 17 00:00:00 2001 From: Alexander Moisseev Date: Sat, 15 Sep 2018 18:09:47 +0300 Subject: [Minor] Initialize variables at declaration --- interface/js/app/history.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'interface/js/app/history.js') 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 = "
" + item.action + "
"; } - var score_content; - if (item.score < item.required_score) { - score_content = "" + item.score.toFixed(2) + " / " + item.required_score + ""; - } else { - score_content = "" + item.score.toFixed(2) + " / " + item.required_score + ""; - } + var score_content = (item.score < item.required_score) + ? "" + item.score.toFixed(2) + " / " + item.required_score + "" + : "" + item.score.toFixed(2) + " / " + item.required_score + ""; 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) { -- cgit v1.2.3