[Pkg-javascript-commits] [node-module-deps] 220/444: handle the empty case

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:47:57 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 11ad21751ab7e0d074e8f52169263a9ddf659afc
Author: James Halliday <mail at substack.net>
Date:   Fri May 9 17:08:25 2014 -0700

    handle the empty case
---
 index.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/index.js b/index.js
index fc09491..fc64cbe 100644
--- a/index.js
+++ b/index.js
@@ -59,6 +59,10 @@ Deps.prototype._read = function () {
 Deps.prototype._start = function () {
     var self = this;
     
+    if (this.entries.length === 0) {
+        return this.push(null);
+    }
+    
     for (var i = 0; i < this.entries.length; i++) (function (i) {
         var main = self.mains[i];
         var file = self.entries[i];

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