moved typeof foo == "undefined" ==> foo === undefined under --unsafe
because 43fd45154b (commitcomment-1864505)
This commit is contained in:
@@ -1371,6 +1371,7 @@ function Compressor(options, false_by_default) {
|
||||
// XXX: intentionally falling down to the next case
|
||||
case "==":
|
||||
case "!=":
|
||||
if (compressor.option("unsafe")) {
|
||||
if (this.left instanceof AST_UnaryPrefix
|
||||
&& this.left.operator == "typeof"
|
||||
&& this.right instanceof AST_String
|
||||
@@ -1387,6 +1388,7 @@ function Compressor(options, false_by_default) {
|
||||
this.right = make_node(AST_Undefined, this.left).optimize(compressor);
|
||||
if (this.operator.length == 2) this.operator += "=";
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (compressor.option("booleans") && compressor.in_boolean_context()) switch (this.operator) {
|
||||
|
||||
Reference in New Issue
Block a user