[Pkg-javascript-commits] [node-module-deps] 272/444: set pending correctly

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:48:03 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 2fd946b3610b8c24e53de7157417daee78c6d198
Author: James Halliday <mail at substack.net>
Date:   Mon Jul 21 23:17:20 2014 -0700

    set pending correctly
---
 index.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/index.js b/index.js
index dc5a254..afefd1c 100644
--- a/index.js
+++ b/index.js
@@ -242,6 +242,7 @@ Deps.prototype.walk = function (id, parent, cb) {
     
     self.resolve(id, parent, function (err, file, pkg) {
         if (opts.postFilter && !opts.postFilter(id, file, pkg)) {
+            if (--self.pending === 0) self.push(null);
             return cb(null, undefined);
         }
         if (err && rec.source) {
@@ -255,7 +256,7 @@ Deps.prototype.walk = function (id, parent, cb) {
             return ts.end(rec.source);
         }
         if (err && self.options.ignoreMissing) {
-            if (-- self.pending === 0) self.push(null);
+            if (--self.pending === 0) self.push(null);
             self.emit('missing', id, parent);
             return cb(null, undefined);
         }

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