allow functions with no symbols
This commit is contained in:
parent
3497a99182
commit
cdf6ce5f66
|
|
@ -2264,11 +2264,14 @@ merge(Compressor.prototype, {
|
||||||
def(AST_Constant, return_true);
|
def(AST_Constant, return_true);
|
||||||
def(AST_Lambda, function(scope){
|
def(AST_Lambda, function(scope){
|
||||||
var self = this;
|
var self = this;
|
||||||
if (self.inlined) return false;
|
|
||||||
var result = true;
|
var result = true;
|
||||||
self.walk(new TreeWalker(function(node) {
|
self.walk(new TreeWalker(function(node) {
|
||||||
if (!result) return true;
|
if (!result) return true;
|
||||||
if (node instanceof AST_SymbolRef) {
|
if (node instanceof AST_SymbolRef) {
|
||||||
|
if (self.inlined) {
|
||||||
|
result = false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
var def = node.definition();
|
var def = node.definition();
|
||||||
if (member(def, self.enclosed)
|
if (member(def, self.enclosed)
|
||||||
&& !self.variables.has(def.name)) {
|
&& !self.variables.has(def.name)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user