diff options
author | Mihai Bazon <mihai.bazon@gmail.com> | 2015-05-07 15:01:16 +0300 |
---|---|---|
committer | Mihai Bazon <mihai.bazon@gmail.com> | 2015-05-07 15:01:16 +0300 |
commit | e48db3a8b6ce8bf06448224dbb3f6339f834ed98 (patch) | |
tree | 3594fab340bbca492dcf821c3f7893c68619cdb2 /lib | |
parent | e637bdaf4e95ce65c1021f7dda7d198054e99e83 (diff) | |
download | tracifyjs-e48db3a8b6ce8bf06448224dbb3f6339f834ed98.tar.gz tracifyjs-e48db3a8b6ce8bf06448224dbb3f6339f834ed98.zip |
Make reserved names take priority over the name cache
Diffstat (limited to 'lib')
-rw-r--r-- | lib/propmangle.js | 2 |
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; } |