From e50701db0122f041234e4d756c17cb4f39791bfb Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Fri, 1 Jun 2018 09:46:59 +0200 Subject: [PATCH] Allow null to be passed as base visitor to walk.recursive --- src/walk/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/walk/index.js b/src/walk/index.js index fdc776c8d..aa521341f 100644 --- a/src/walk/index.js +++ b/src/walk/index.js @@ -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)