minor clean-ups (#5701)

This commit is contained in:
Alex Lam S.L
2022-10-05 19:06:21 +01:00
committed by GitHub
parent be8ccc3ab5
commit 94a954c3d1
17 changed files with 89 additions and 77 deletions

View File

@@ -368,7 +368,6 @@ Compressor.prototype.compress = function(node) {
args: [],
});
}
return self;
});
AST_Node.DEFMETHOD("wrap_expression", function() {
var self = this;
@@ -5083,7 +5082,7 @@ Compressor.prototype.compress = function(node) {
return static_fn && (static_fn[node.property] || expr.name == "Math" && node.property == "random");
}
// Accomodate when compress option evaluate=false
// Accommodate when compress option evaluate=false
// as well as the common constant expressions !0 and -1
(function(def) {
def(AST_Node, return_false);
@@ -11882,7 +11881,7 @@ Compressor.prototype.compress = function(node) {
if (nullish ? ll == null : !ll) {
AST_Node.warn("Condition left of {operator} always {value} [{start}]", {
operator: self.operator,
value: nullish ? "nulish" : "false",
value: nullish ? "nullish" : "false",
start: self.start,
});
return make_sequence(self, [ self.left, self.right ]).optimize(compressor);