From e29f1825be8a841fc4e094790e51f52e34d253d3 Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Tue, 2 Nov 2021 17:05:13 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B04367=20Fix=20"redeclaration=20of=20const?= =?UTF-8?q?=20CombodoSanitizer"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The utils.js can be included more than once in old iTop branches :( This is fixed in 3.0.0 (develop branch) Also add missing ";" --- js/utils.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/js/utils.js b/js/utils.js index b1d1f9585..23744aa62 100644 --- a/js/utils.js +++ b/js/utils.js @@ -730,8 +730,7 @@ else { Dict.S = function (sEntry) { if (sEntry in Dict._entries) { return Dict._entries[sEntry]; - } - else { + } else { return sEntry; } }; @@ -739,7 +738,7 @@ Dict.Format = function () { var args = Array.from(arguments); args[0] = Dict.S(arguments[0]); return Format(args); -} +}; @@ -751,7 +750,7 @@ Dict.Format = function () { * @api * @since 2.6.5 2.7.6 3.0.0 N°4367 */ -const CombodoSanitizer = { +var CombodoSanitizer = { ENUM_SANITIZATION_FILTER_INTEGER: 'integer', ENUM_SANITIZATION_FILTER_STRING: 'string', ENUM_SANITIZATION_FILTER_CONTEXT_PARAM: 'context_param', @@ -805,4 +804,4 @@ const CombodoSanitizer = { return sDefaultValue; } } -} \ No newline at end of file +}; \ No newline at end of file