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.

This commit is contained in:
Anat Dagan
2017-02-10 14:13:47 +02:00
parent 7f8d72d9d3
commit 81f1df14d7

View 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) {