Skip to content

Commit

Permalink
Fix handlebars-lang#597. If-helper doesn't anymore consider 0 as fals…
Browse files Browse the repository at this point in the history
…y value.
  • Loading branch information
artiee committed Aug 15, 2013
1 parent 860853d commit db47593
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/handlebars/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ Handlebars.registerHelper('if', function(conditional, options) {
var type = toString.call(conditional);
if(type === functionType) { conditional = conditional.call(this); }

if(!conditional || Handlebars.Utils.isEmpty(conditional)) {
if(Handlebars.Utils.isEmpty(conditional)) {
return options.inverse(this);
} else {
return options.fn(this);
Expand Down

0 comments on commit db47593

Please sign in to comment.