[Pkg-javascript-commits] [node-module-deps] 422/444: Default transform options to {} when using array syntax

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:48:19 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 7d5a3923cb110974f9e8a1a942d7a12ade3840f2
Author: Ben Drucker <bvdrucker at gmail.com>
Date:   Thu May 26 15:43:29 2016 -0700

    Default transform options to {} when using array syntax
    
    Fixes #117, Closes #118
---
 index.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/index.js b/index.js
index 7eba12a..4047e4e 100644
--- a/index.js
+++ b/index.js
@@ -252,7 +252,7 @@ Deps.prototype.getTransforms = function (file, pkg, opts) {
     function makeTransform (tr, cb) {
         var trOpts = {};
         if (Array.isArray(tr)) {
-            trOpts = tr[1];
+            trOpts = tr[1] || {};
             tr = tr[0];
         }
         trOpts._flags = trOpts.hasOwnProperty('_flags') ? trOpts._flags : self.options;

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