fix bug in collapse_vars for right side of "||" and "&&"

This commit is contained in:
kzc
2016-01-27 14:18:46 -05:00
parent f4c2ea37bf
commit 0a38a688f9
2 changed files with 46 additions and 1 deletions

View File

@@ -312,8 +312,11 @@ merge(Compressor.prototype, {
|| node instanceof AST_Try
|| node instanceof AST_With
|| node instanceof AST_IterationStatement
|| (parent instanceof AST_Binary
&& (parent.operator == "&&" || parent.operator == "||")
&& node === parent.right)
|| (parent instanceof AST_Switch && node !== parent.expression)) {
return unwind = true, node;
return side_effects_encountered = unwind = true, node;
}
},
function postorder(node) {