[Pkg-javascript-commits] [node-module-deps] 240/444: Fixing error handling where tr was undefined if there's no cache.

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:47:59 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 b1a86bad80a6f145c156634d4bb670cf2dec42dd
Author: James Cleveland <jc at blit.cc>
Date:   Wed May 28 11:38:04 2014 +0100

    Fixing error handling where tr was undefined if there's no cache.
---
 index.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/index.js b/index.js
index e3797eb..7c277aa 100644
--- a/index.js
+++ b/index.js
@@ -152,8 +152,8 @@ Deps.prototype.resolve = function (id, parent, cb) {
 };
 
 Deps.prototype.readFile = function (file, pkg) {
+    var tr = through();
     if (this.cache && this.cache[file]) {
-        var tr = through();
         tr.push(this.cache[file].source);
         tr.push(null);
         return tr;

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