consistently reduce const safe literals (#2411)

fixes #2406
This commit is contained in:
Alex Lam S.L
2017-10-28 11:36:44 +08:00
committed by GitHub
parent 6ab73c7bd5
commit 6371e2ee63
2 changed files with 86 additions and 1 deletions

View File

@@ -320,7 +320,7 @@ merge(Compressor.prototype, {
d.fixed = false;
} else {
var value = node.fixed_value();
if (unused) {
if (unused && !compressor.exposed(d)) {
d.single_use = value
&& d.references.length == 1
&& loop_ids[d.id] === in_loop