Skip to content

Commit 4bb70b6

Browse files
committed
Merge pull request #103 from zakki/walk-cb
guard walk() against not having a cb
2 parents 3ba70a8 + c4b3527 commit 4bb70b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ Deps.prototype.walk = function (id, parent, cb) {
326326
if (opts.postFilter && !opts.postFilter(id, file, pkg)) {
327327
if (--self.pending === 0) self.push(null);
328328
if (input) --self.inputPending;
329-
return cb(null, undefined);
329+
return cb && cb(null, undefined);
330330
}
331331
if (err && rec.source) {
332332
file = rec.file;

0 commit comments

Comments
 (0)