diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2017-06-08 03:27:03 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-08 03:27:03 +0800 |
commit | 9c306406f14087ad0a62141bf7bb9e12afcc1a75 (patch) | |
tree | 282cf98cc57a3aa0982f6adcddfaffbe2fefbb84 /lib/minify.js | |
parent | 9db0695b10799349c005fc14ab1268c2478c25fd (diff) | |
download | tracifyjs-9c306406f14087ad0a62141bf7bb9e12afcc1a75.tar.gz tracifyjs-9c306406f14087ad0a62141bf7bb9e12afcc1a75.zip |
fix iteration over object with inherited properties (#2068)
fixes #2055
Diffstat (limited to 'lib/minify.js')
-rw-r--r-- | lib/minify.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/minify.js b/lib/minify.js index 16f5b189..cc638be3 100644 --- a/lib/minify.js +++ b/lib/minify.js @@ -86,7 +86,7 @@ function minify(files, options) { } options.parse = options.parse || {}; options.parse.toplevel = null; - for (var name in files) { + for (var name in files) if (HOP(files, name)) { options.parse.filename = name; options.parse.toplevel = parse(files[name], options.parse); if (options.sourceMap && options.sourceMap.content == "inline") { @@ -134,7 +134,7 @@ function minify(files, options) { if (options.sourceMap.includeSources) { if (files instanceof AST_Toplevel) { throw new Error("original source content unavailable"); - } else for (var name in files) { + } else for (var name in files) if (HOP(files, name)) { options.output.source_map.get().setSourceContent(name, files[name]); } } |