aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/compress.js2
-rw-r--r--lib/minify.js4
2 files changed, 3 insertions, 3 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)
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]);
}
}