aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnat Dagan <anadt@ironsrc.com>2017-02-10 14:13:47 +0200
committerAnat Dagan <anadt@ironsrc.com>2017-02-10 14:13:47 +0200
commit81f1df14d7c931cddedad9666a7c57f4373ec918 (patch)
tree7a7758cf8d8a5ed405cc12078cfb6563a7ca2565
parent7f8d72d9d37396f2da05d5d824f74bd414c30119 (diff)
downloadtracifyjs-81f1df14d7c931cddedad9666a7c57f4373ec918.tar.gz
tracifyjs-81f1df14d7c931cddedad9666a7c57f4373ec918.zip
in mangle_names there is a check that the variable name is legal and that it is not a reserved word. This should apply to propsmangle as well.
-rw-r--r--lib/propmangle.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/propmangle.js b/lib/propmangle.js
index f2777475..3c75cac9 100644
--- a/lib/propmangle.js
+++ b/lib/propmangle.js
@@ -149,6 +149,7 @@ function mangle_properties(ast, options) {
// only function declarations after this line
function can_mangle(name) {
+ if (!is_identifier(name)) return false;
if (unmangleable.indexOf(name) >= 0) return false;
if (reserved.indexOf(name) >= 0) return false;
if (options.only_cache) {