mangle: do not mangle reserved class (#2317)

fixes #2316
This commit is contained in:
GUENEGO Jean-Louis
2017-09-23 18:08:47 +02:00
committed by Alex Lam S.L
parent a784717fe2
commit 1241600013
2 changed files with 37 additions and 1 deletions

View File

@@ -546,7 +546,7 @@ AST_Toplevel.DEFMETHOD("mangle_names", function(options){
var mangle_with_block_scope =
(!options.ie8 && node instanceof AST_SymbolCatch) ||
node instanceof AST_SymbolBlockDeclaration;
if (mangle_with_block_scope) {
if (mangle_with_block_scope && options.reserved.indexOf(node.name) < 0) {
to_mangle.push(node.definition());
return;
}