diff options
Diffstat (limited to 'lib/compress.js')
-rw-r--r-- | lib/compress.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/compress.js b/lib/compress.js index a464b664..8ea5d8c9 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -4456,8 +4456,13 @@ merge(Compressor.prototype, { var sym = def.name.definition(); if (!drop_vars || sym.id in in_use_ids) { if (def.value && indexOf_assign(sym, def) < 0) { - def.value = def.value.drop_side_effect_free(compressor); - if (def.value) def.value.tail_node().write_only = false; + var value = def.value.drop_side_effect_free(compressor); + if (def.value !== value) def.value = value && make_sequence(def.value, [ + value, + make_node(AST_Number, def.value, { + value: 0 + }), + ]); } var old_def, var_defs = var_defs_by_id.get(sym.id); if (!def.value) { |