From 12c6239bf51c3ebb451cb8900115898e79a194f5 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Fri, 2 Mar 2012 18:00:40 +0000 Subject: [PATCH] Keeping JSHint happy --- js/JavaScriptParser.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/JavaScriptParser.js b/js/JavaScriptParser.js index 298a024be..0be409229 100644 --- a/js/JavaScriptParser.js +++ b/js/JavaScriptParser.js @@ -22,8 +22,9 @@ var JavaScriptParser = function(options) { // Parse a string of JavaScript code or JSON and return the parse tree as a wikitext parse tree JavaScriptParser.prototype.parse = function(type,code) { // Try to parse the code + var parseTree; try { - var parseTree = esprima.parse(code,{comment: true,tokens: true,range: true}); + parseTree = esprima.parse(code,{comment: true,tokens: true,range: true}); } catch(ex) { // Return a helpful error if the parse failed return new WikiTextParseTree([