N°4367 Fix "redeclaration of const CombodoSanitizer"

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 ";"
This commit is contained in:
Pierre Goiffon
2021-11-02 17:05:13 +01:00
parent 9b854dbcc7
commit e29f1825be

View File

@@ -730,8 +730,7 @@ else {
Dict.S = function (sEntry) { Dict.S = function (sEntry) {
if (sEntry in Dict._entries) { if (sEntry in Dict._entries) {
return Dict._entries[sEntry]; return Dict._entries[sEntry];
} } else {
else {
return sEntry; return sEntry;
} }
}; };
@@ -739,7 +738,7 @@ Dict.Format = function () {
var args = Array.from(arguments); var args = Array.from(arguments);
args[0] = Dict.S(arguments[0]); args[0] = Dict.S(arguments[0]);
return Format(args); return Format(args);
} };
@@ -751,7 +750,7 @@ Dict.Format = function () {
* @api * @api
* @since 2.6.5 2.7.6 3.0.0 N°4367 * @since 2.6.5 2.7.6 3.0.0 N°4367
*/ */
const CombodoSanitizer = { var CombodoSanitizer = {
ENUM_SANITIZATION_FILTER_INTEGER: 'integer', ENUM_SANITIZATION_FILTER_INTEGER: 'integer',
ENUM_SANITIZATION_FILTER_STRING: 'string', ENUM_SANITIZATION_FILTER_STRING: 'string',
ENUM_SANITIZATION_FILTER_CONTEXT_PARAM: 'context_param', ENUM_SANITIZATION_FILTER_CONTEXT_PARAM: 'context_param',
@@ -805,4 +804,4 @@ const CombodoSanitizer = {
return sDefaultValue; return sDefaultValue;
} }
} }
} };