fix mangleProperties on identifiers (#1776)
- fix handling of "-Infinity" - add test case for "-0" reverts #1481
This commit is contained in:
@@ -47,6 +47,7 @@ function find_builtins() {
|
||||
// NaN will be included due to Number.NaN
|
||||
var a = [
|
||||
"Infinity",
|
||||
"-Infinity",
|
||||
"undefined",
|
||||
];
|
||||
[ Object, Array, Function, Number,
|
||||
@@ -153,7 +154,6 @@ function mangle_properties(ast, options) {
|
||||
// only function declarations after this line
|
||||
|
||||
function can_mangle(name) {
|
||||
if (!is_identifier(name)) return false;
|
||||
if (unmangleable.indexOf(name) >= 0) return false;
|
||||
if (reserved.indexOf(name) >= 0) return false;
|
||||
if (options.only_cache) {
|
||||
|
||||
Reference in New Issue
Block a user