public
/
UglifyJS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e637bda
)
Make reserved names take priority over the name cache
author
Mihai Bazon
<mihai.bazon@gmail.com>
Thu, 7 May 2015 12:01:16 +0000
(15:01 +0300)
committer
Mihai Bazon
<mihai.bazon@gmail.com>
Thu, 7 May 2015 12:01:16 +0000
(15:01 +0300)
lib/propmangle.js
patch
|
blob
|
history
diff --git
a/lib/propmangle.js
b/lib/propmangle.js
index
8f291d6
..
d3e582d
100644
(file)
--- a/
lib/propmangle.js
+++ b/
lib/propmangle.js
@@
-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;
}