fix hoist_props on const (#2724)

fixes #2710
This commit is contained in:
Alex Lam S.L
2018-01-05 06:23:53 +08:00
committed by GitHub
parent ffc64e2279
commit f76b5e0f43
2 changed files with 71 additions and 0 deletions

View File

@@ -3274,6 +3274,7 @@ merge(Compressor.prototype, {
&& (def = sym.definition()).escaped != 1
&& !def.single_use
&& !def.direct_access
&& !compressor.exposed(def)
&& !top_retain(def)
&& (value = sym.fixed_value()) === node.value
&& value instanceof AST_Object) {