Skip to content

Commit

Permalink
Allow null to be passed as base visitor to walk.recursive
Browse files Browse the repository at this point in the history
  • Loading branch information
marijnh committed Jun 1, 2018
1 parent 6e4192f commit e50701d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/walk/index.js
Expand Up @@ -45,7 +45,7 @@ export function ancestor(node, visitors, baseVisitor = base, state) {
// their child nodes (by calling their third argument on these
// nodes).
export function recursive(node, state, funcs, baseVisitor, override) {
let visitor = funcs ? exports.make(funcs, baseVisitor) : baseVisitor
let visitor = funcs ? make(funcs, baseVisitor || undefined) : baseVisitor
;(function c(node, st, override) {
visitor[override || node.type](node, st, c)
})(node, state, override)
Expand Down

0 comments on commit e50701d

Please sign in to comment.