in mangle_names there is a check that the variable name is legal and that it is not...
authorAnat Dagan <anadt@ironsrc.com>
Fri, 10 Feb 2017 12:13:47 +0000 (14:13 +0200)
committerAnat Dagan <anadt@ironsrc.com>
Fri, 10 Feb 2017 12:13:47 +0000 (14:13 +0200)
lib/propmangle.js

index f277747..3c75cac 100644 (file)
@@ -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) {