aboutsummaryrefslogtreecommitdiff
path: root/lib/compress.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-06-08 03:27:03 +0800
committerGitHub <noreply@github.com>2017-06-08 03:27:03 +0800
commit9c306406f14087ad0a62141bf7bb9e12afcc1a75 (patch)
tree282cf98cc57a3aa0982f6adcddfaffbe2fefbb84 /lib/compress.js
parent9db0695b10799349c005fc14ab1268c2478c25fd (diff)
downloadtracifyjs-9c306406f14087ad0a62141bf7bb9e12afcc1a75.tar.gz
tracifyjs-9c306406f14087ad0a62141bf7bb9e12afcc1a75.zip
fix iteration over object with inherited properties (#2068)
fixes #2055
Diffstat (limited to 'lib/compress.js')
-rw-r--r--lib/compress.js2
1 files changed, 1 insertions, 1 deletions
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)