From 8c3697c50469b8710abe827b7e7c8e4128d02c8c Mon Sep 17 00:00:00 2001 From: alexlamsl Date: Wed, 21 Sep 2016 01:44:27 +0800 Subject: [PATCH] optimize top-level variables as well --- lib/compress.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/compress.js b/lib/compress.js index bfb476cf..14fb8f1e 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -1108,7 +1108,7 @@ merge(Compressor.prototype, { this._evaluating = true; try { var d = this.definition(); - if (d && (d.constant || compressor.option("reduce_vars") && !d.global && !d.modified) && d.init) { + if (d && (d.constant || compressor.option("reduce_vars") && !d.modified) && d.init) { return ev(d.init, compressor); } } finally {