Skip to content

Commit

Permalink
Remove unnecessary conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
kpdecker committed Feb 7, 2014
1 parent 6ca06d4 commit b0e7298
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/handlebars/compiler/javascript-compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ JavaScriptCompiler.prototype = {
wrap = true;
}

if (/^[0-9]+$/.test(name)) {
ret = parent + "[" + name + "]";
} else if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) {
if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) {
ret = parent + "." + name;
} else {
ret = parent + "['" + name + "']";
Expand Down

0 comments on commit b0e7298

Please sign in to comment.