aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMihai Bazon <mihai.bazon@gmail.com>2015-05-07 15:01:16 +0300
committerMihai Bazon <mihai.bazon@gmail.com>2015-05-07 15:01:16 +0300
commite48db3a8b6ce8bf06448224dbb3f6339f834ed98 (patch)
tree3594fab340bbca492dcf821c3f7893c68619cdb2 /lib
parente637bdaf4e95ce65c1021f7dda7d198054e99e83 (diff)
downloadtracifyjs-e48db3a8b6ce8bf06448224dbb3f6339f834ed98.tar.gz
tracifyjs-e48db3a8b6ce8bf06448224dbb3f6339f834ed98.zip
Make reserved names take priority over the name cache
Diffstat (limited to 'lib')
-rw-r--r--lib/propmangle.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/propmangle.js b/lib/propmangle.js
index 8f291d64..d3e582d6 100644
--- 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;
}