[Pkg-javascript-commits] [node-module-deps] 118/444: fix errors queueing null results

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:47:48 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 b3b50361bac12e57ebe290036be860a7a7c6d5d2
Author: James Halliday <mail at substack.net>
Date:   Mon Jul 8 16:56:18 2013 -0700

    fix errors queueing null results
---
 index.js | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/index.js b/index.js
index 4de2f81..35b8016 100644
--- a/index.js
+++ b/index.js
@@ -38,13 +38,12 @@ module.exports = function (mains, opts) {
         var upto = 0;
         
         return function (row, order) {
-            if (row === null) {
-                output.queue(null);
-            }
-            else if (order === upto) {
-                if (row) output.queue(row);
+            if (order === upto) {
+                if (row !== false) output.queue(row);
                 for (upto ++; slots[upto] !== undefined; upto++) {
-                    if (slots[upto]) output.queue(slots[upto]);
+                    if (slots[upto] !== false) {
+                        output.queue(slots[upto]);
+                    }
                     delete slots[upto];
                 }
             }
@@ -112,7 +111,7 @@ module.exports = function (mains, opts) {
             if (cb) cb(file);
             if (visited[file]) {
                 pushResult(false, order);
-                if (--pending === 0) pushResult(null);
+                if (--pending === 0) pushResult(null, currentOrder ++);
                 return;
             }
             visited[file] = true;
@@ -217,7 +216,7 @@ module.exports = function (mains, opts) {
                 rec.entry = true;
             }
             pushResult(rec, order);
-            if (--pending === 0) pushResult(null);
+            if (--pending === 0) pushResult(null, currentOrder ++);
         }
     }
     

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