diff options
author | Mihai Bazon <mihai.bazon@gmail.com> | 2015-03-16 10:53:31 +0200 |
---|---|---|
committer | Mihai Bazon <mihai.bazon@gmail.com> | 2015-03-16 10:53:31 +0200 |
commit | 0c80d21e01f7f7f7ec76f80ed02e4935ca9d952a (patch) | |
tree | 288ed6ea80e0a1c0c9fbb9905c0dc0d17389361d /lib/propmangle.js | |
parent | 375c88245a89fecf4387d6bde732ee2f230aecc6 (diff) | |
download | tracifyjs-0c80d21e01f7f7f7ec76f80ed02e4935ca9d952a.tar.gz tracifyjs-0c80d21e01f7f7f7ec76f80ed02e4935ca9d952a.zip |
Fix prop mangling
Even if not “defined”, do mangle if name exists in the cache.
Diffstat (limited to 'lib/propmangle.js')
-rw-r--r-- | lib/propmangle.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/propmangle.js b/lib/propmangle.js index 41eeffe4..f79b4748 100644 --- a/lib/propmangle.js +++ b/lib/propmangle.js @@ -145,7 +145,8 @@ function mangle_properties(ast, options) { } function should_mangle(name) { - return names_to_mangle.indexOf(name) >= 0; + return cache.props.has(name) + || names_to_mangle.indexOf(name) >= 0; } function add(name) { |