From d8a35de805200ff0110eae556b1083baae415c8d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ga=C3=ABtan=20Duchaussois?= Date: Tue, 10 Oct 2017 09:50:24 +0200 Subject: [PATCH] Fix undefined symbol name in webui. The EscapeHTML function called with undefined value return "undefined" as string. This PR avoid giving undefined value to sym.name --- interface/js/app/history.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/interface/js/app/history.js b/interface/js/app/history.js index b13b3007b..422b8aa3b 100644 --- a/interface/js/app/history.js +++ b/interface/js/app/history.js @@ -63,7 +63,9 @@ function($, _, Humanize) { case "symbols": Object.keys(item.symbols).map(function(key) { var sym = item.symbols[key]; - + if (!sym.name) { + sym.name = key; + } sym.name = EscapeHTML(key); sym.description = EscapeHTML(sym.description); @@ -117,9 +119,7 @@ function($, _, Humanize) { preprocess_item(item); Object.keys(item.symbols).map(function(key) { var sym = item.symbols[key]; - if (!sym.name) { - sym.name = key; - } + var str = '' + sym.name + '' + "(" + sym.score + ")"; if (sym.options) { -- 2.39.5