diff options
Diffstat (limited to 'lib/compress.js')
-rw-r--r-- | lib/compress.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/compress.js b/lib/compress.js index ed048593..6a59a9d5 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -2675,9 +2675,10 @@ merge(Compressor.prototype, { if (hit_index <= end) return handle_custom_scan_order(node, tt); hit = true; if (node instanceof AST_VarDef) { - node.value = null; declare_only[node.name.name] = (declare_only[node.name.name] || 0) + 1; if (value_def) value_def.replaced++; + node = node.clone(); + node.value = null; return node; } return in_list ? List.skip : null; |