diff --git a/esprima-to-ast.js b/esprima-to-ast.js index 63f29dc65e81e5bdcbba9b29ac665fda48fe29a0..e8d54241b39fc5cfd180f3e1a83d96a68f2dccd7 100644 --- a/esprima-to-ast.js +++ b/esprima-to-ast.js @@ -181,7 +181,7 @@ function esprimaToAST(prog) { throw new EsprimaToASTError("trCatchClause called with wrong type: " + clause.type); } // clause.guard is a custom Mozilla extension - return [clause.param, trBlockStat(clause.body)]; + return [trPattern(clause.param), trBlockStat(clause.body)]; }; /*** Statements ***/