From 81f1df14d7c931cddedad9666a7c57f4373ec918 Mon Sep 17 00:00:00 2001 From: Anat Dagan Date: Fri, 10 Feb 2017 14:13:47 +0200 Subject: [PATCH] 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. --- lib/propmangle.js | 1 + 1 file changed, 1 insertion(+) 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) { -- 2.34.1