Skip to content

Commit

Permalink
Merge branch 'performance'
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Sep 24, 2010
2 parents 1bb02ec + 50275a7 commit 2318abf
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/compiler.js
Expand Up @@ -225,13 +225,10 @@ Compiler.prototype = {
visitCode: function(code){
var end;

// Wrap code blocks with {}
if (code.block) {
// Optimize for if / else
if (0 == code.val.trim().indexOf('if') ||
0 == code.val.trim().indexOf('else')) {
end = true;
code.val += ' {';
}
end = true;
code.val += ' {';
}

// Buffer code
Expand Down

0 comments on commit 2318abf

Please sign in to comment.