From b95e3338d9704927046a030fe814302f55737e0d Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Thu, 28 Dec 2017 17:01:01 +0800 Subject: fix `pure_getters` on `AST_Binary` (#2681) fixes #2678 --- lib/compress.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'lib') diff --git a/lib/compress.js b/lib/compress.js index ac5cd235..4e3a8f82 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -1693,15 +1693,8 @@ merge(Compressor.prototype, { return this.operator == "void"; }); def(AST_Binary, function(compressor) { - switch (this.operator) { - case "&&": - return this.left._dot_throw(compressor); - case "||": - return this.left._dot_throw(compressor) - && this.right._dot_throw(compressor); - default: - return false; - } + return (this.operator == "&&" || this.operator == "||") + && (this.left._dot_throw(compressor) || this.right._dot_throw(compressor)); }) def(AST_Assign, function(compressor) { return this.operator == "=" -- cgit v1.2.3