diff options
Diffstat (limited to 'lib/compress.js')
-rw-r--r-- | lib/compress.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/compress.js b/lib/compress.js index c596de3e..e645bd4e 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -1356,7 +1356,10 @@ merge(Compressor.prototype, { return node.operator != "=" && lhs.equivalent_to(node.left); } if (node instanceof AST_Call) { - return lhs instanceof AST_PropAccess && lhs.equivalent_to(node.expression); + if (!(lhs instanceof AST_PropAccess)) return false; + if (!lhs.equivalent_to(node.expression)) return false; + var rhs = get_rvalue(candidate); + return !(rhs instanceof AST_Function && !rhs.contains_this()); } if (node instanceof AST_Debugger) return true; if (node instanceof AST_Defun) return funarg && lhs.name === node.name.name; |