Skip to content

Commit aedbc56

Browse files
Praveen Nmarijnh
authored andcommitted
Update index.js
1 parent 8118d99 commit aedbc56

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

acorn-walk/src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function simple(node, visitors, baseVisitor, state, override) {
2828
// An ancestor walk keeps an array of ancestor nodes (including the
2929
// current node) and passes them to the callback as third parameter
3030
// (and also as state parameter when no other state is present).
31-
export function ancestor(node, visitors, baseVisitor, state) {
31+
export function ancestor(node, visitors, baseVisitor, state, override) {
3232
let ancestors = []
3333
if (!baseVisitor) baseVisitor = base
3434
;(function c(node, st, override) {
@@ -38,7 +38,7 @@ export function ancestor(node, visitors, baseVisitor, state) {
3838
baseVisitor[type](node, st, c)
3939
if (found) found(node, st || ancestors, ancestors)
4040
if (isNew) ancestors.pop()
41-
})(node, state)
41+
})(node, state, override)
4242
}
4343

4444
// A recursive walk is one where your functions override the default

0 commit comments

Comments
 (0)