[Pkg-javascript-commits] [node-module-deps] 22/444: Only process rows with source

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:47:39 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-module-deps.

commit 9c2429ef2eb6088580f93b13b069d6f49ccd4410
Author: Anatoliy Chakkaev <rpm1602 at gmail.com>
Date:   Sat Feb 23 14:36:07 2013 +0700

    Only process rows with source
---
 index.js | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/index.js b/index.js
index a846001..a18d830 100644
--- a/index.js
+++ b/index.js
@@ -19,7 +19,7 @@ module.exports = function (mains, opts) {
     if (!opts) opts = {};
     if (opts.cache === undefined) opts.cache = cache;
     opts.includeSource = true;
-    
+
     mains.forEach(function (file) {
         pending ++;
         var p = 2, src, rows;
@@ -39,7 +39,9 @@ module.exports = function (mains, opts) {
             };
             
             walk(rows);
-            if (--pending === 0) output.queue(null);
+            if (--pending === 0) {
+                output.queue(null);
+            }
         }
         
         fs.readFile(file, 'utf8', function (err, s) {
@@ -63,7 +65,7 @@ module.exports = function (mains, opts) {
     
     function walk (rows) {
         rows.forEach(function (row) {
-            if (files[row.filename]) return;
+            if (!row.source || files[row.filename]) return;
             var r = files[row.filename] = {
                 id: row.filename,
                 source: row.source,

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-module-deps.git



More information about the Pkg-javascript-commits mailing list