fix side_effects on AST_Class (#2031)

fixes #2028
This commit is contained in:
Alex Lam S.L
2017-05-31 01:44:29 +08:00
committed by GitHub
parent 23265ac253
commit 303293e4aa
2 changed files with 37 additions and 1 deletions

View File

@@ -251,7 +251,7 @@ merge(Compressor.prototype, {
})
});
}
if (node instanceof AST_Lambda && node !== self) {
if (node instanceof AST_Class || node instanceof AST_Lambda && node !== self) {
return node;
}
if (node instanceof AST_Block) {