diff options
author | Anat Dagan <anadt@ironsrc.com> | 2017-02-10 14:13:47 +0200 |
---|---|---|
committer | Anat Dagan <anadt@ironsrc.com> | 2017-02-10 14:13:47 +0200 |
commit | 81f1df14d7c931cddedad9666a7c57f4373ec918 (patch) | |
tree | 7a7758cf8d8a5ed405cc12078cfb6563a7ca2565 | |
parent | 7f8d72d9d37396f2da05d5d824f74bd414c30119 (diff) | |
download | tracifyjs-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.js | 1 |
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) { |