fix corner case in pure_getters (#4804)

fixes #4803
This commit is contained in:
Alex Lam S.L
2021-03-19 08:16:53 +00:00
committed by GitHub
parent 3016a78d85
commit b89cc84c3a
2 changed files with 32 additions and 11 deletions

View File

@@ -3601,14 +3601,7 @@ merge(Compressor.prototype, {
return true;
});
def(AST_Binary, function(compressor) {
switch (this.operator) {
case "&&":
return this.left._dot_throw(compressor) || this.right._dot_throw(compressor);
case "||":
return this.right._dot_throw(compressor);
default:
return false;
}
return lazy_op[this.operator] && (this.left._dot_throw(compressor) || this.right._dot_throw(compressor));
});
def(AST_Class, return_false);
def(AST_Conditional, function(compressor) {