check the start node for performance
This commit is contained in:
parent
e5604c9804
commit
5b8417bd7d
|
|
@ -89,8 +89,12 @@ SymbolDef.prototype = {
|
||||||
|
|
||||||
// https://github.com/mishoo/UglifyJS2/issues/1095
|
// https://github.com/mishoo/UglifyJS2/issues/1095
|
||||||
// prevent mangle name conflict while using `let` or `const`
|
// prevent mangle name conflict while using `let` or `const`
|
||||||
if (this.orig[0] instanceof AST_SymbolBlockDeclaration)
|
if (this.orig[0] instanceof AST_SymbolBlockDeclaration) {
|
||||||
s = s.parent_scope;
|
var start = s.start;
|
||||||
|
if (start && start.type === 'keyword' && (start.value ==='default' || start.value === 'case')) {
|
||||||
|
s = s.parent_scope;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.mangled_name = s.next_mangled(options, this);
|
this.mangled_name = s.next_mangled(options, this);
|
||||||
if (this.global && cache) {
|
if (this.global && cache) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user