[Pkg-javascript-commits] [node-module-deps] 400/444: guard walk() against not having a cb

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:48:17 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 c4b3527b7391eeb1f086c0677be44f6649734970
Author: Kensuke Matsuzaki <matsuzaki at kitec.co.jp>
Date:   Fri Oct 16 13:14:10 2015 +0900

    guard walk() against not having a cb
---
 index.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/index.js b/index.js
index 923b0b5..dcca706 100644
--- a/index.js
+++ b/index.js
@@ -324,7 +324,7 @@ Deps.prototype.walk = function (id, parent, cb) {
         if (opts.postFilter && !opts.postFilter(id, file, pkg)) {
             if (--self.pending === 0) self.push(null);
             if (input) --self.inputPending;
-            return cb(null, undefined);
+            return cb && cb(null, undefined);
         }
         if (err && rec.source) {
             file = rec.file;

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