From: Artemy Tregubenko Date: Thu, 9 Jan 2014 14:20:05 +0000 (+0100) Subject: added hasOwnProperty check to avoid warnings X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=f6203bd5a8063a3af835603ce1959310f14f7f5e;p=UglifyJS.git added hasOwnProperty check to avoid warnings --- diff --git a/tools/node.js b/tools/node.js index 4dfa9338..bef296ea 100644 --- a/tools/node.js +++ b/tools/node.js @@ -114,7 +114,9 @@ exports.minify = function(files, options) { }); if (options.sourceMapIncludeSources) { for (var file in sourcesContent) { - options.source_map.get().setSourceContent(file, sourcesContent[file]); + if (sourcesContent.hasOwnProperty(file)) { + options.source_map.get().setSourceContent(file, sourcesContent[file]); + } } }