diff --git a/runtime/JavaScript/src/antlr4/tree/Tree.js b/runtime/JavaScript/src/antlr4/tree/Tree.js index 22ea34496..688c61e48 100644 --- a/runtime/JavaScript/src/antlr4/tree/Tree.js +++ b/runtime/JavaScript/src/antlr4/tree/Tree.js @@ -65,7 +65,7 @@ function ParseTreeVisitor() { ParseTreeVisitor.prototype.visit = function(ctx) { if (Array.isArray(ctx)) { return ctx.map(function(child) { - return ctx.accept(this); + return child.accept(this); }, this); } else { return ctx.accept(this);