fix escape analysis for `AST_Await

fixes #2566
This commit is contained in:
alexlamsl
2017-12-10 14:43:09 +08:00
parent f778a0aa01
commit c7e8fc4830
2 changed files with 47 additions and 0 deletions

View File

@@ -686,6 +686,7 @@ merge(Compressor.prototype, {
d.escaped = true;
return;
} else if (parent instanceof AST_Array
|| parent instanceof AST_Await
|| parent instanceof AST_Conditional && node !== parent.condition
|| parent instanceof AST_Sequence && node === parent.tail_node()) {
mark_escaped(d, scope, parent, parent, level + 1);