aboutsummaryrefslogtreecommitdiff
path: root/lib/ast.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ast.js')
-rw-r--r--lib/ast.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ast.js b/lib/ast.js
index 3e6e1771..0b0273c8 100644
--- a/lib/ast.js
+++ b/lib/ast.js
@@ -698,9 +698,9 @@ function TreeWalker(callback) {
TreeWalker.prototype = {
_visit: function(node, descend) {
this.stack.push(node);
- var ret = this.visit(node, function(){
+ var ret = this.visit(node, descend ? function(){
descend.call(node);
- });
+ } : noop);
if (!ret && descend) {
descend.call(node);
}