[Pkg-javascript-commits] [node-acorn-jsx] 52/484: [walker] Allow custom fields to be added to new walkers
Bastien Roucariès
rouca at moszumanska.debian.org
Sat Aug 19 14:20:03 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 f91d7f583605dd9b85b1a63170d882a27d753b10
Author: Marijn Haverbeke <marijnh at gmail.com>
Date: Thu Nov 8 21:07:31 2012 +0100
[walker] Allow custom fields to be added to new walkers
Issue #13
---
util/walk.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/util/walk.js b/util/walk.js
index 97321ac..43cca6f 100644
--- a/util/walk.js
+++ b/util/walk.js
@@ -46,8 +46,8 @@
exports.make = function(funcs, base) {
if (!base) base = exports;
var visitor = {};
- for (var type in base)
- visitor[type] = funcs.hasOwnProperty(type) ? funcs[type] : base[type];
+ for (var type in base) visitor[type] = base[type];
+ for (var type in funcs) visitor[type] = funcs[type];
return visitor;
};
--
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