aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/compress.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/compress.js b/lib/compress.js
index a7585a60..1a1b64f9 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -2553,9 +2553,6 @@ merge(Compressor.prototype, {
return this.tail_node().is_string(compressor);
});
def(AST_String, return_true);
- def(AST_Sub, function(compressor) {
- return this.expression.is_string(compressor) && this.property instanceof AST_Number;
- });
def(AST_SymbolRef, function(compressor) {
var fixed = this.fixed_value();
if (!fixed) return false;
@@ -2994,7 +2991,8 @@ merge(Compressor.prototype, {
val = global_objs[exp.name];
} else {
val = exp._eval(compressor, cached, depth + 1);
- if (!val || val === exp || !HOP(val, key)) return this;
+ if (!val || val === exp) return this;
+ if (typeof val == "object" && !HOP(val, key)) return this;
if (typeof val == "function") switch (key) {
case "name":
return val.node.name ? val.node.name.name : "";