Merge pull request #1481 from anatdagan/propsmangle_only_identifiers

verify that property names after mangle are legal
This commit is contained in:
Mihai Bazon
2017-02-12 10:59:43 +02:00
committed by GitHub

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