Skip to content

Commit c4b3527

Browse files
committed
guard walk() against not having a cb
1 parent 9112e32 commit c4b3527

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
@@ -324,7 +324,7 @@ Deps.prototype.walk = function (id, parent, cb) {
324324
if (opts.postFilter && !opts.postFilter(id, file, pkg)) {
325325
if (--self.pending === 0) self.push(null);
326326
if (input) --self.inputPending;
327-
return cb(null, undefined);
327+
return cb && cb(null, undefined);
328328
}
329329
if (err && rec.source) {
330330
file = rec.file;

0 commit comments

Comments
 (0)