fix crash in unsafe replacement of undefined

remove extraneous call to AST_SymbolRef.reference()

closes #1443
This commit is contained in:
alexlamsl
2017-02-18 18:58:23 +08:00
parent dd31d12a91
commit 11676f9d72
2 changed files with 70 additions and 3 deletions

View File

@@ -2721,13 +2721,11 @@ merge(Compressor.prototype, {
var scope = compressor.find_parent(AST_Scope);
var undef = scope.find_variable("undefined");
if (undef) {
var ref = make_node(AST_SymbolRef, self, {
return make_node(AST_SymbolRef, self, {
name : "undefined",
scope : scope,
thedef : undef
});
ref.reference();
return ref;
}
}
return self;