This commit is contained in:
Mihai Bazon
2012-09-28 11:12:47 +03:00
parent 05e15b1c0c
commit 896444482a
2 changed files with 12 additions and 2 deletions

View File

@@ -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);
}