From 307680f14b45f5cbaeb152880a1b3be464ad8e68 Mon Sep 17 00:00:00 2001 From: alexlamsl Date: Sun, 21 May 2017 23:43:27 +0800 Subject: [PATCH] process non-inherited properties only --- lib/compress.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/compress.js b/lib/compress.js index e2f2d6b4..a2f8f267 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -89,7 +89,7 @@ function Compressor(options, false_by_default) { }, true); var global_defs = this.options["global_defs"]; if (typeof global_defs == "object") for (var key in global_defs) { - if (/^@/.test(key)) { + if (/^@/.test(key) && HOP(global_defs, key)) { var ast = parse(global_defs[key]); if (ast.body.length == 1 && ast.body[0] instanceof AST_SimpleStatement) { global_defs[key.slice(1)] = ast.body[0].body;