[Pkg-javascript-commits] [node-acorn-jsx] 68/484: [walker] Allow recursive walks without building a new walker obj

Bastien Roucariès rouca at moszumanska.debian.org
Sat Aug 19 14:20:06 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-acorn-jsx.

commit e6485e61fde63d8d4a820b70cf699ca7d0383ab8
Author: Marijn Haverbeke <marijnh at gmail.com>
Date:   Tue Jan 8 13:17:37 2013 +0100

    [walker] Allow recursive walks without building a new walker obj
---
 util/walk.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util/walk.js b/util/walk.js
index 43cca6f..05a0efe 100644
--- a/util/walk.js
+++ b/util/walk.js
@@ -34,7 +34,7 @@
   // their child nodes (by calling their third argument on these
   // nodes).
   exports.recursive = function(node, state, funcs, base) {
-    var visitor = exports.make(funcs, base);
+    var visitor = funcs ? exports.make(funcs, base) : base;
     function c(node, st, override) {
       visitor[override || node.type](node, st, c);
     }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-acorn-jsx.git



More information about the Pkg-javascript-commits mailing list