Make reserved names take priority over the name cache
This commit is contained in:
@@ -140,10 +140,10 @@ function mangle_properties(ast, options) {
|
||||
// only function declarations after this line
|
||||
|
||||
function can_mangle(name) {
|
||||
if (reserved.indexOf(name) >= 0) return false;
|
||||
if (options.only_cache) {
|
||||
return cache.props.has(name);
|
||||
}
|
||||
if (reserved.indexOf(name) >= 0) return false;
|
||||
if (/^[0-9.]+$/.test(name)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user