Skip to content

Commit d2c1e10

Browse files
committed
Ensure "resolve" gets its own copy of "parent"
See #81 (comment)
1 parent 3533cac commit d2c1e10

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -379,12 +379,6 @@ Deps.prototype.walk = function (id, parent, cb) {
379379

380380
function fromDeps (file, src, pkg, deps) {
381381
var p = deps.length;
382-
var current = {
383-
id: file,
384-
filename: file,
385-
paths: self.paths,
386-
package: pkg
387-
};
388382
var resolved = {};
389383

390384
if (input) --self.inputPending;
@@ -397,6 +391,12 @@ Deps.prototype.walk = function (id, parent, cb) {
397391
if (--p === 0) done();
398392
return;
399393
}
394+
var current = {
395+
id: file,
396+
filename: file,
397+
paths: self.paths,
398+
package: pkg
399+
};
400400
self.walk(id, current, function (err, r) {
401401
resolved[id] = r;
402402
if (--p === 0) done();

0 commit comments

Comments
 (0)