From 9c306406f14087ad0a62141bf7bb9e12afcc1a75 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Thu, 8 Jun 2017 03:27:03 +0800 Subject: fix iteration over object with inherited properties (#2068) fixes #2055 --- lib/compress.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/compress.js') diff --git a/lib/compress.js b/lib/compress.js index 81b9ccac..5f2ac2b0 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -1419,7 +1419,7 @@ merge(Compressor.prototype, { }); if (value && typeof value == "object") { var props = []; - for (var key in value) { + for (var key in value) if (HOP(value, key)) { props.push(make_node(AST_ObjectKeyVal, orig, { key: key, value: to_node(value[key], orig) -- cgit v1.2.3