[Pkg-javascript-commits] [node-module-deps] 130/444: fix another pending bug, remove superfluous index tracking

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:47:49 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 ce81501e167b4dc81cb80cd26701808db390f62e
Author: James Halliday <mail at substack.net>
Date:   Tue Jul 9 00:42:39 2013 -0700

    fix another pending bug, remove superfluous index tracking
---
 index.js | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/index.js b/index.js
index 3b85d60..0cacaea 100644
--- a/index.js
+++ b/index.js
@@ -95,7 +95,10 @@ module.exports = function (mains, opts) {
             ].join('')));
             
             if (cb) cb(file);
-            if (visited[file]) return --pending;
+            if (visited[file]) {
+                if (--pending === 0) output.queue(null);
+                return;
+            }
             
             visited[file] = true;
             
@@ -174,7 +177,6 @@ module.exports = function (mains, opts) {
         var p = deps.length;
         var current = { id: file, filename: file, paths: [], package: pkg };
         var resolved = {};
-        var indexes = {};
         
         deps.forEach(function (id) {
             if (opts.filter && !opts.filter(id)) {
@@ -183,9 +185,8 @@ module.exports = function (mains, opts) {
                 return;
             }
             
-            walk(id, current, function (r, index) {
+            walk(id, current, function (r) {
                 resolved[id] = r;
-                indexes[id] = index;
                 if (--p === 0) done();
             });
         });

-- 
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