diff options
Diffstat (limited to 'lib/compress.js')
-rw-r--r-- | lib/compress.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/compress.js b/lib/compress.js index 76be4753..f59cc4d4 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -3362,6 +3362,7 @@ merge(Compressor.prototype, { cached.forEach(function(node) { delete node._eval; }); + if (cached.unsafe) return this; if (ignore_side_effects) return val; if (!val || val instanceof RegExp) return val; if (typeof val == "function" || typeof val == "object") return this; @@ -3430,6 +3431,10 @@ merge(Compressor.prototype, { var value = node._eval(compressor, ignore_side_effects, cached, depth); if (value === node) return this; modified(lhs); + if (Array.isArray(value)) value.toString = function() { + cached.unsafe = true; + return "[]"; + }; return value; }); def(AST_Sequence, function(compressor, ignore_side_effects, cached, depth) { |