[Pkg-javascript-commits] [node-module-deps] 372/444: Ensure "resolve" gets its own copy of "parent"

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:48:14 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 d2c1e10bf79e17c9876feb284e003039f1aee9f4
Author: Andres Suarez <zertosh at gmail.com>
Date:   Tue May 5 13:45:26 2015 -0400

    Ensure "resolve" gets its own copy of "parent"
    
    See https://github.com/substack/module-deps/pull/81#issuecomment-98904207
---
 index.js | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/index.js b/index.js
index fc2ede6..b0a159a 100644
--- a/index.js
+++ b/index.js
@@ -379,12 +379,6 @@ Deps.prototype.walk = function (id, parent, cb) {
     
     function fromDeps (file, src, pkg, deps) {
         var p = deps.length;
-        var current = {
-            id: file,
-            filename: file,
-            paths: self.paths,
-            package: pkg
-        };
         var resolved = {};
         
         if (input) --self.inputPending;
@@ -397,6 +391,12 @@ Deps.prototype.walk = function (id, parent, cb) {
                     if (--p === 0) done();
                     return;
                 }
+                var current = {
+                    id: file,
+                    filename: file,
+                    paths: self.paths,
+                    package: pkg
+                };
                 self.walk(id, current, function (err, r) {
                     resolved[id] = r;
                     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