From 9bdb95c9e34cef640534e5e5a1e2225a80442000 Mon Sep 17 00:00:00 2001 From: HelenHuang <LinHuang@pollex.com.tw> Date: 星期四, 09 六月 2022 15:48:15 +0800 Subject: [PATCH] TODO#139894 [ footer -最下方說明與保經代合作 ] 文案修改 --- PAMapp/node_modules/uglify-js/lib/sourcemap.js | 20 +++++++++++--------- 1 files changed, 11 insertions(+), 9 deletions(-) diff --git a/PAMapp/node_modules/uglify-js/lib/sourcemap.js b/PAMapp/node_modules/uglify-js/lib/sourcemap.js index 94966a6..a230a44 100644 --- a/PAMapp/node_modules/uglify-js/lib/sourcemap.js +++ b/PAMapp/node_modules/uglify-js/lib/sourcemap.js @@ -77,21 +77,23 @@ } function create_array_map() { - var map = Object.create(null); + var map = new Dictionary(); var array = []; array.index = function(name) { - if (!HOP(map, name)) { - map[name] = array.length; + var index = map.get(name); + if (!(index >= 0)) { + index = array.length; array.push(name); + map.set(name, index); } - return map[name]; + return index; }; return array; } function SourceMap(options) { var sources = create_array_map(); - var sources_content = options.includeSources && Object.create(null); + var sources_content = options.includeSources && new Dictionary(); var names = create_array_map(); var mappings = ""; if (options.orig) Object.keys(options.orig).forEach(function(name) { @@ -110,7 +112,7 @@ if (!sources_content || !map.sourcesContent) return; for (var i = 0; i < map.sources.length; i++) { var content = map.sourcesContent[i]; - if (content) sources_content[map.sources[i]] = content; + if (content) sources_content.set(map.sources[i], content); } }); var prev_source; @@ -144,8 +146,8 @@ add(source, gen_line, gen_col, orig_line, orig_col, name); } : add, setSourceContent: sources_content ? function(source, content) { - if (!(source in sources_content)) { - sources_content[source] = content; + if (!sources_content.has(source)) { + sources_content.set(source, content); } } : noop, toString: function() { @@ -155,7 +157,7 @@ sourceRoot: options.root || undefined, sources: sources, sourcesContent: sources_content ? sources.map(function(source) { - return sources_content[source] || null; + return sources_content.get(source) || null; }) : undefined, names: names, mappings: mappings, -- Gitblit v1.8.0