From 99cf8eafc4f6cae6e6187dfa929da756536dbeb8 Mon Sep 17 00:00:00 2001 From: Alexander Moisseev Date: Wed, 11 Jul 2018 11:13:40 +0300 Subject: [PATCH] [WebUI] Do not redeclare variables --- .eslintrc.json | 1 - interface/js/app/config.js | 5 +++-- interface/js/app/history.js | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index ee10918bb..7e3d6f05d 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -76,7 +76,6 @@ "no-loop-func": "off", "no-negated-condition": "off", "no-param-reassign": "off", - "no-redeclare": "off", "no-shadow": "off", "no-underscore-dangle": "off", "no-use-before-define": "off", diff --git a/interface/js/app/config.js b/interface/js/app/config.js index a64e8f3ab..160061694 100644 --- a/interface/js/app/config.js +++ b/interface/js/app/config.js @@ -77,10 +77,11 @@ define(["jquery"], $tbody = $(""); $.each(data, function (i, item) { + var label; if ((item.editable === false || rspamd.read_only)) { - var label = "Read"; + label = "Read"; } else { - var label = "Read Write"; + label = "Read Write"; } var $tr = $(""); $("" + label + "").appendTo($tr); diff --git a/interface/js/app/history.js b/interface/js/app/history.js index 573a21407..b264df67a 100644 --- a/interface/js/app/history.js +++ b/interface/js/app/history.js @@ -158,15 +158,16 @@ define(["jquery", "footable", "humanize"], preprocess_item(item); Object.keys(item.symbols).map(function (key) { + var str; var sym = item.symbols[key]; if (sym.description) { - var str = "" + sym.name + "(" + sym.score + ")"; + str = "" + sym.name + "(" + sym.score + ")"; // Store description for tooltip symbolDescriptions[key] = sym.description; } else { - var str = "" + sym.name + "(" + sym.score + ")"; + str = "" + sym.name + "(" + sym.score + ")"; } if (sym.options) { -- 2.39.5