added hasOwnProperty check to avoid warnings
authorArtemy Tregubenko <me@arty.name>
Thu, 9 Jan 2014 14:20:05 +0000 (15:20 +0100)
committerArtemy Tregubenko <me@arty.name>
Thu, 9 Jan 2014 14:20:05 +0000 (15:20 +0100)
tools/node.js

index 4dfa933..bef296e 100644 (file)
@@ -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]);
+                }
             }
         }